We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34c343a commit f55e4d0Copy full SHA for f55e4d0
library/std/src/sys/windows/mod.rs
@@ -118,9 +118,9 @@ pub fn unrolled_find_u16s(needle: u16, haystack: &[u16]) -> Option<usize> {
118
start = &start[8..];
119
}
120
121
- for (i, c) in start.iter().enumerate() {
+ for c in start {
122
if *c == needle {
123
- return Some((start.as_ptr() as usize - ptr as usize) / 2 + i);
+ return Some((c as *const u16 as usize - ptr as usize) / 2);
124
125
126
None
0 commit comments