2021-02-07 17:34:59 +01:00
|
|
|
// run-rustfix
|
|
|
|
|
2021-02-10 08:15:29 +01:00
|
|
|
#![allow(clippy::unnecessary_operation)]
|
2021-02-07 17:34:59 +01:00
|
|
|
#![warn(clippy::bytes_nth)]
|
|
|
|
|
|
|
|
fn main() {
|
2021-02-10 08:15:29 +01:00
|
|
|
let s = String::from("String");
|
|
|
|
s.as_bytes().get(3);
|
|
|
|
&s.as_bytes().get(3);
|
|
|
|
s[..].as_bytes().get(3);
|
2021-02-07 17:34:59 +01:00
|
|
|
}
|