mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 21:30:03 -04:00
Fix warnings while compiling for win32
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user