]> git.lizzy.rs Git - rust.git/blob - tests/ui/bytes_nth.fixed
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / 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 }