diff options
Diffstat (limited to 'src/win32/mod.rs')
-rw-r--r-- | src/win32/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs index be72d53..1f5f3c0 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -111,8 +111,8 @@ impl Window { /// /// Calls SetWindowText on the HWND. pub fn set_title(&self, text: &str) { - let text = OsStr::from_str(text).encode_wide().chain(Some(0).into_iter()) - .collect::<Vec<_>>(); + let text = OsStr::new(text).encode_wide().chain(Some(0).into_iter()) + .collect::<Vec<_>>(); unsafe { user32::SetWindowTextW(self.window.0, text.as_ptr() as winapi::LPCWSTR); |