Skip to content

Commit

Permalink
redundant_slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Nov 22, 2023
1 parent 4208a22 commit bfa7e8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bfa7e8c

Please sign in to comment.