mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
redundant_slicing
This commit is contained in:
parent
852c038393
commit
6c8ebf174c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user