2023-04-23 06:03:09 -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-25 18:08:29 -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
|
|
|
}
|