From 4e5740761b2a143e7d3290a58ccabc89200a4763 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Mon, 4 Aug 2014 22:55:55 -0600 Subject: [PATCH] Upgrade Rust. --- gl2.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl2.rs b/gl2.rs index 375683b..104e5db 100644 --- a/gl2.rs +++ b/gl2.rs @@ -15,7 +15,7 @@ use std::mem; use std::cmp; use std::ptr; use std::str::from_utf8; -use std::str::raw::from_c_str; +use std::string; use std::mem::size_of; use std::vec::Vec; @@ -758,7 +758,7 @@ pub fn get_string(which: GLenum) -> String { unsafe { let llstr = glGetString(which); if !llstr.is_null() { - return from_c_str(llstr as *const c_char); + return string::raw::from_buf(llstr as *const u8); } else { return "".to_string(); }