]> git.lizzy.rs Git - rust.git/commitdiff
Remove an unnecessary .move_iter().collect()
authorSimon Sapin <simon.sapin@exyr.org>
Mon, 12 May 2014 15:04:45 +0000 (16:04 +0100)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 13 May 2014 02:52:29 +0000 (19:52 -0700)
src/libstd/os.rs

index 134cfa89a37f3bc7e2a50f1ce9f4a80d651ce64b..b10b74183fea9b15cd4c612873588d90b3efaa58 100644 (file)
@@ -142,7 +142,7 @@ pub fn fill_utf16_buf_and_decode(f: |*mut u16, DWORD| -> DWORD)
     }
 
     pub fn as_utf16_p<T>(s: &str, f: |*u16| -> T) -> T {
-        let mut t = s.to_utf16().move_iter().collect::<Vec<u16>>();
+        let mut t = s.to_utf16();
         // Null terminate before passing on.
         t.push(0u16);
         f(t.as_ptr())