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