about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2023-11-22 00:10:48 +0000
committerChris Denton <chris@chrisdenton.dev>2023-11-22 13:17:02 +0000
commit6c8ebf174c3201ec6333e8bf2df291b88e338d35 (patch)
tree0cc7d9340c8b486d3c10c2f15de4c86a17940610
parent852c0383930a80c646441104a89af59f949c9804 (diff)
downloadrust-6c8ebf174c3201ec6333e8bf2df291b88e338d35.tar.gz
rust-6c8ebf174c3201ec6333e8bf2df291b88e338d35.zip
redundant_slicing
-rw-r--r--library/std/src/sys/windows/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/windows/mod.rs b/library/std/src/sys/windows/mod.rs
index 14e34ffec4d..9c83d6eb8bf 100644
--- a/library/std/src/sys/windows/mod.rs
+++ b/library/std/src/sys/windows/mod.rs
@@ -150,7 +150,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
 
 pub fn unrolled_find_u16s(needle: u16, haystack: &[u16]) -> Option<usize> {
     let ptr = haystack.as_ptr();
-    let mut start = &haystack[..];
+    let mut start = haystack;
 
     // For performance reasons unfold the loop eight times.
     while start.len() >= 8 {