Skip to content

Commit

Permalink
avoid creating unnecessary reference in Windows Env iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 27, 2020
1 parent 7b73d14 commit 2a1e61e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2a1e61e

Please sign in to comment.