]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/bytes_nth.fixed
Auto merge of #101969 - reez12g:issue-101306, r=reez12g
[rust.git] / src / tools / clippy / tests / ui / bytes_nth.fixed
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.as_bytes().get(3);
9     let _ = &s.as_bytes().get(3);
10     let _ = s[..].as_bytes().get(3);
11 }