blob: 1ecffea53035e3e308333f6b1539a901b7746286 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// run-rustfix
#![allow(clippy::unnecessary_operation)]
#![warn(clippy::bytes_nth)]
fn main() {
let s = String::from("String");
let _ = s.bytes().nth(3);
let _ = &s.bytes().nth(3).unwrap();
let _ = s[..].bytes().nth(3);
}
|