2021-02-11 08:04:38 -06:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
#![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.as_bytes().get(3);
|
2021-06-18 03:11:32 -05:00
|
|
|
let _ = &s.as_bytes().get(3);
|
2022-03-26 09:37:48 -05:00
|
|
|
let _ = s[..].as_bytes().get(3);
|
2021-02-11 08:04:38 -06:00
|
|
|
}
|