]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/bytes_nth.fixed
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / bytes_nth.fixed
CommitLineData
f20569fa
XL
1// run-rustfix
2
3#![allow(clippy::unnecessary_operation)]
4#![warn(clippy::bytes_nth)]
5
6fn main() {
7 let s = String::from("String");
8 s.as_bytes().get(3);
9 &s.as_bytes().get(3);
10 s[..].as_bytes().get(3);
11}