]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/bytes_nth.rs
Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into sync_cg_clif-2022-05-15
[rust.git] / src / tools / clippy / tests / ui / bytes_nth.rs
1 // run-rustfix
2
3 #![allow(clippy::unnecessary_operation)]
4 #![warn(clippy::bytes_nth)]
5
6 fn main() {
7     let s = String::from("String");
8     let _ = s.bytes().nth(3);
9     let _ = &s.bytes().nth(3);
10     let _ = s[..].bytes().nth(3);
11 }