]> git.lizzy.rs Git - rust.git/blob - tests/ui/bytes_nth.rs
Auto merge of #6650 - daxpedda:cargo-common-metadata-publish, r=flip1995
[rust.git] / 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     s.bytes().nth(3);
9     &s.bytes().nth(3);
10     s[..].bytes().nth(3);
11 }