aboutsummaryrefslogtreecommitdiffstats
path: root/examples/support/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/support/mod.rs')
-rw-r--r--examples/support/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/support/mod.rs b/examples/support/mod.rs
index 7144952..94ef1a7 100644
--- a/examples/support/mod.rs
+++ b/examples/support/mod.rs
@@ -22,7 +22,7 @@ pub fn load(window: &glutin::Window) -> Context {
let version = unsafe {
use std::ffi;
- ffi::c_str_to_bytes(&(gl.GetString(gl::VERSION) as *const i8)).to_string()
+ String::from_utf8(ffi::c_str_to_bytes(&(gl.GetString(gl::VERSION) as *const i8)).to_vec()).unwrap()
};
println!("OpenGL version {}", version);