Remove an unnecessary .move_iter().collect()

This commit is contained in:
Simon Sapin 2014-05-12 16:04:45 +01:00 committed by Alex Crichton
parent e798b97ce9
commit 16351731ac

View File

@ -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())