Fix warnings while compiling for win32

This commit is contained in:
Tomaka17 2014-10-11 17:58:17 +02:00
parent 8e8549b4ac
commit cb32e64b72
2 changed files with 7 additions and 5 deletions

View file

@ -85,7 +85,8 @@ impl Window {
pub fn set_title(&self, text: &str) {
unsafe {
ffi::SetWindowTextW(self.window,
text.utf16_units().collect::<Vec<u16>>().append_one(0).as_ptr() as ffi::LPCWSTR);
text.utf16_units().chain(Some(0).into_iter())
.collect::<Vec<u16>>().as_ptr() as ffi::LPCWSTR);
}
}