summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/bytes_nth.fixed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /src/tools/clippy/tests/ui/bytes_nth.fixed
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz
rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/tests/ui/bytes_nth.fixed6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/clippy/tests/ui/bytes_nth.fixed b/src/tools/clippy/tests/ui/bytes_nth.fixed
index b1fb2e16b..a35c679af 100644
--- a/src/tools/clippy/tests/ui/bytes_nth.fixed
+++ b/src/tools/clippy/tests/ui/bytes_nth.fixed
@@ -5,7 +5,7 @@
fn main() {
let s = String::from("String");
- let _ = s.as_bytes().get(3);
- let _ = &s.as_bytes().get(3);
- let _ = s[..].as_bytes().get(3);
+ let _ = s.as_bytes().get(3).copied();
+ let _ = &s.as_bytes()[3];
+ let _ = s[..].as_bytes().get(3).copied();
}