From 2a1e61e2d653cd287ac902bdf3411d8cbbc40f0c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 27 Mar 2020 16:34:15 +0100 Subject: [PATCH] avoid creating unnecessary reference in Windows Env iterator --- src/libstd/sys/windows/os.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index cc4ae40590693..a0da2498bb7e0 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -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;