1
Fork 0

avoid creating unnecessary reference in Windows Env iterator

This commit is contained in:
Ralf Jung 2020-03-27 16:34:15 +01:00
parent 7b73d14b0b
commit 2a1e61e2d6

View file

@ -94,7 +94,7 @@ impl Iterator for Env {
if *self.cur == 0 {
return None;
}
let p = &*self.cur as *const u16;
let p = self.cur as *const u16;
let mut len = 0;
while *p.offset(len) != 0 {
len += 1;