From 65d5589e3ccfa4d6425d16a7df186dde9d9ed861 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sun, 1 Mar 2015 13:18:36 +0100 Subject: Fix various warnings --- src/win32/init.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/win32/init.rs') diff --git a/src/win32/init.rs b/src/win32/init.rs index 13da111..23bb364 100644 --- a/src/win32/init.rs +++ b/src/win32/init.rs @@ -2,6 +2,7 @@ use std::sync::atomic::AtomicBool; use std::ptr; use std::mem; use std::os; +use std::thread; use super::callback; use super::Window; use super::MonitorID; @@ -39,7 +40,7 @@ pub fn new_window(builder: BuilderAttribs<'static>, builder_sharelists: Option, builder: BuilderAttribs<'static>, let extra_functions = gl::wgl_extra::Wgl::load_with(|addr| { use libc; - let addr = CString::from_slice(addr.as_bytes()); + let addr = CString::new(addr.as_bytes()).unwrap(); let addr = addr.as_ptr(); gl::wgl::GetProcAddress(addr) as *const libc::c_void -- cgit v1.2.3