2023-04-20 09:37:15 -05:00
|
|
|
//@run-rustfix
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
#![allow(clippy::unnecessary_operation)]
|
|
|
|
#![warn(clippy::bytes_nth)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = String::from("String");
|
2022-03-26 09:37:48 -05:00
|
|
|
let _ = s.bytes().nth(3);
|
2023-02-16 10:41:04 -06:00
|
|
|
let _ = &s.bytes().nth(3).unwrap();
|
2022-03-26 09:37:48 -05:00
|
|
|
let _ = s[..].bytes().nth(3);
|
2021-02-11 08:04:38 -06:00
|
|
|
}
|