diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cursor.rs | 2 | ||||
-rw-r--r-- | examples/grabbing.rs | 2 | ||||
-rw-r--r-- | examples/multiwindow.rs | 10 | ||||
-rw-r--r-- | examples/support/mod.rs | 5 | ||||
-rw-r--r-- | examples/vsync.rs | 2 | ||||
-rw-r--r-- | examples/window.rs | 2 |
6 files changed, 7 insertions, 16 deletions
diff --git a/examples/cursor.rs b/examples/cursor.rs index c5bcbd6..0dced66 100644 --- a/examples/cursor.rs +++ b/examples/cursor.rs @@ -1,5 +1,3 @@ -#![feature(std_misc)] - #[cfg(target_os = "android")] #[macro_use] extern crate android_glue; diff --git a/examples/grabbing.rs b/examples/grabbing.rs index 8088774..8a46750 100644 --- a/examples/grabbing.rs +++ b/examples/grabbing.rs @@ -1,5 +1,3 @@ -#![feature(std_misc)] - #[cfg(target_os = "android")] #[macro_use] extern crate android_glue; diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs index a7680b8..ce97266 100644 --- a/examples/multiwindow.rs +++ b/examples/multiwindow.rs @@ -1,12 +1,10 @@ -#![feature(std_misc)] - #[cfg(target_os = "android")] #[macro_use] extern crate android_glue; extern crate glutin; -use std::thread::Thread; +use std::thread; mod support; @@ -22,15 +20,15 @@ fn main() { let window2 = glutin::Window::new().unwrap(); let window3 = glutin::Window::new().unwrap(); - let t1 = Thread::scoped(move || { + let t1 = thread::scoped(move || { run(window1, (0.0, 1.0, 0.0, 1.0)); }); - let t2 = Thread::scoped(move || { + let t2 = thread::scoped(move || { run(window2, (0.0, 0.0, 1.0, 1.0)); }); - let t3 = Thread::scoped(move || { + let t3 = thread::scoped(move || { run(window3, (1.0, 0.0, 0.0, 1.0)); }); diff --git a/examples/support/mod.rs b/examples/support/mod.rs index 94ef1a7..329bd4b 100644 --- a/examples/support/mod.rs +++ b/examples/support/mod.rs @@ -1,5 +1,6 @@ #![cfg(feature = "window")] +use std::ffi::CStr; use glutin; #[cfg(not(target_os = "android"))] @@ -21,8 +22,8 @@ pub fn load(window: &glutin::Window) -> Context { let gl = gl::Gl::load(window); let version = unsafe { - use std::ffi; - String::from_utf8(ffi::c_str_to_bytes(&(gl.GetString(gl::VERSION) as *const i8)).to_vec()).unwrap() + let data = CStr::from_ptr(gl.GetString(gl::VERSION) as *const i8).to_bytes().to_vec(); + String::from_utf8(data).unwrap() }; println!("OpenGL version {}", version); diff --git a/examples/vsync.rs b/examples/vsync.rs index 768bfc0..ec9ea79 100644 --- a/examples/vsync.rs +++ b/examples/vsync.rs @@ -1,5 +1,3 @@ -#![feature(std_misc)] - #[cfg(target_os = "android")] #[macro_use] extern crate android_glue; diff --git a/examples/window.rs b/examples/window.rs index 0e2a3cf..1d3b615 100644 --- a/examples/window.rs +++ b/examples/window.rs @@ -1,5 +1,3 @@ -#![feature(std_misc)] - #[cfg(target_os = "android")] #[macro_use] extern crate android_glue; |