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