Sign in
◑
Theme
rust
/
rust
/
32ce99c38ee6a9d4a397e97a9017d69052d63d0f
/
.
/
src
/
tools
/
clippy
/
tests
/
ui
/
bytes_nth.rs
blob: 2684474248c1aa6ae7d1dc927d2ad0e9fe893989 [
file
]
#![
warn
(
clippy
::
bytes_nth
)]
fn
main
()
{
let
s
=
String
::
from
(
"String"
);
let
_
=
s
.
bytes
().
nth
(
3
);
//~^ bytes_nth
let
_
=
&
s
.
bytes
().
nth
(
3
).
unwrap
();
//~^ bytes_nth
let
_
=
s
[..].
bytes
().
nth
(
3
);
//~^ bytes_nth
}