Remove deprecated functions

This commit is contained in:
Pierre Krieger 2015-04-03 18:36:57 +02:00
parent 424cc5ea49
commit b99309bee2
4 changed files with 11 additions and 11 deletions

View file

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