Sign in
android
/
toolchain
/
rustc
/
5c0824a599f2f1f4dcb9c92edf09f6c1b555988d
/
.
/
src
/
tools
/
clippy
/
tests
/
ui
/
bytes_nth.fixed
blob: a35c679afb71f37739b7e0b60dcfa70092a54e06 [
file
] [
log
] [
blame
]
// run-rustfix
#![allow(clippy::unnecessary_operation)]
#![warn(clippy::bytes_nth)]
fn main
()
{
let
s
=
String
::
from
(
"String"
);
let
_
=
s
.
as_bytes
().
get
(
3
).
copied
();
let
_
=
&
s
.
as_bytes
()[
3
];
let
_
=
s
[..].
as_bytes
().
get
(
3
).
copied
();
}