]> git.lizzy.rs Git - rust.git/blob - tests/ui/bytes_nth.fixed
add a new lint `bytes_nth`
[rust.git] / tests / ui / bytes_nth.fixed
1 // run-rustfix
2
3 #![warn(clippy::bytes_nth)]
4
5 fn main() {
6     let _ = "Hello".as_bytes().get(3);
7
8     let _ = String::from("Hello").as_bytes().get(3);
9 }