redundant_slicing

This commit is contained in:
Chris Denton 2023-11-22 00:10:48 +00:00
parent 852c038393
commit 6c8ebf174c
No known key found for this signature in database
GPG Key ID: 713472F2F45627DE

View File

@ -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 {