-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(volo-thrift): fix clippy warning
needless_as_bytes
(#529)
https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes ``` error: needless call to `as_bytes()` --> volo-thrift/src/codec/default/ttheader.rs:389:37 | 389 | dst.put_u16(TT_HEADER_BIZ_STATUS_KEY.as_bytes().len() as u16); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `TT_HEADER_BIZ_STATUS_KEY.len()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes = note: `-D clippy::needless-as-bytes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_as_bytes)]` ``` Signed-off-by: Yu Li <[email protected]>
- Loading branch information
1 parent
5d85c3d
commit d6af79e
Showing
2 changed files
with
23 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters