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 2f1298a commit 605e388
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 605e388

Please sign in to comment.