aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
authormitchmindtree <mitchell.nordine@gmail.com>2015-02-22 01:17:47 +1100
committermitchmindtree <mitchell.nordine@gmail.com>2015-02-22 01:17:47 +1100
commit1055eed078f674ad4cc657e99a247310183d635e (patch)
tree862f0b3320c22d8cd5b7283203b71f10b66dab7d /src/x11
parent0389c834e4b456ad6dcce4f687c69ab0e84beafa (diff)
downloadglutin-1055eed078f674ad4cc657e99a247310183d635e.tar.gz
glutin-1055eed078f674ad4cc657e99a247310183d635e.zip
Removed as_slice_with_nul as CString now derefs to a CStr
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/headless.rs2
-rw-r--r--src/x11/window/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/x11/headless.rs b/src/x11/headless.rs
index a0f0556..ca47414 100644
--- a/src/x11/headless.rs
+++ b/src/x11/headless.rs
@@ -8,7 +8,7 @@ use super::ffi;
fn with_c_str<F, T>(s: &str, f: F) -> T where F: FnOnce(*const libc::c_char) -> T {
use std::ffi::CString;
let c_str = CString::from_slice(s.as_bytes());
- f(c_str.as_bytes_with_nul().as_ptr())
+ f(c_str.as_ptr())
}
pub struct HeadlessContext {
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index 0c6da4e..8664b4a 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -39,7 +39,7 @@ fn ensure_thread_init() {
fn with_c_str<F, T>(s: &str, f: F) -> T where F: FnOnce(*const libc::c_char) -> T {
use std::ffi::CString;
let c_str = CString::from_slice(s.as_bytes());
- f(c_str.as_bytes_with_nul().as_ptr())
+ f(c_str.as_ptr())
}
struct XWindow {