diff options
Diffstat (limited to 'src/win32/make_current_guard.rs')
-rw-r--r-- | src/win32/make_current_guard.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/win32/make_current_guard.rs b/src/win32/make_current_guard.rs index d6bcc8e..8983899 100644 --- a/src/win32/make_current_guard.rs +++ b/src/win32/make_current_guard.rs @@ -1,5 +1,5 @@ use std::marker::PhantomData; -use std::os; +use std::io; use libc; use winapi; @@ -30,7 +30,7 @@ impl<'a, 'b> CurrentContextGuard<'a, 'b> { if result == 0 { return Err(CreationError::OsError(format!("wglMakeCurrent function failed: {}", - os::error_string(os::errno())))); + format!("{}", io::Error::last_os_error())))); } Ok(CurrentContextGuard { @@ -42,7 +42,6 @@ impl<'a, 'b> CurrentContextGuard<'a, 'b> { } } -#[unsafe_destructor] impl<'a, 'b> Drop for CurrentContextGuard<'a, 'b> { fn drop(&mut self) { unsafe { |