You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
```lang=text
warning: needless call to `as_bytes()`
--> fbcode/buck2/allocative/allocative/src/key.rs:55:19
|
55 | while i < s.as_bytes().len() {
| ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
= note: `-W clippy::needless-as-bytes` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_as_bytes)]`
warning: needless call to `as_bytes()`
--> fbcode/buck2/allocative/allocative_derive/src/derive_allocative.rs:35:15
|
35 | while i < s.as_bytes().len() {
| ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
= note: `-W clippy::needless-as-bytes` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_as_bytes)]`
warning: needless call to `as_bytes()`
--> fbcode/buck2/app/buck2_core/src/ascii_char_set.rs:20:20
|
20 | while i != chars.as_bytes().len() {
| ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `chars.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
= note: `-W clippy::needless-as-bytes` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_as_bytes)]`
warning: needless call to `as_bytes()`
--> fbcode/buck2/app/buck2_core/src/pattern/ascii_pattern.rs:114:40
|
114 | debug_assert!(start <= s.as_bytes().len() - 1);
| ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
warning: needless call to `as_bytes()`
--> fbcode/buck2/app/buck2_core/src/pattern/ascii_pattern.rs:118:55
|
118 | s.as_bytes().get_unchecked(start..s.as_bytes().len() - 1),
| ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
errors: 0; warnings: 5
```
Reviewed By: JakobDegen
Differential Revision: D72681966
fbshipit-source-id: 612a7f69d7b029b3d4cb8d1c4f431454aa036e48
0 commit comments