Skip to content

Commit

Permalink
Remove an unnecessary .move_iter().collect()
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin authored and alexcrichton committed May 13, 2014
1 parent e798b97 commit 1635173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/os.rs
Expand Up @@ -142,7 +142,7 @@ pub mod win32 {
}

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())
Expand Down

0 comments on commit 1635173

Please sign in to comment.