diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-04-03 07:52:12 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-04-03 07:52:12 +0200 |
commit | 93f4581c08b1b25852527223a6f3608870532a87 (patch) | |
tree | 5323fa00d2ea700dd64dfd2dff36ac169ccac163 /src/x11/window/mod.rs | |
parent | 6c990ae48866e6110600aadcb3a0d8850deab42b (diff) | |
parent | d33c138164d069f025439f97920771f1f8c7775e (diff) | |
download | glutin-93f4581c08b1b25852527223a6f3608870532a87.tar.gz glutin-93f4581c08b1b25852527223a6f3608870532a87.zip |
Merge pull request #348 from tomaka/rustup
Rustup
Diffstat (limited to 'src/x11/window/mod.rs')
-rw-r--r-- | src/x11/window/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 7c93ad3..0188386 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()); + let c_str = CString::new(s.as_bytes().to_vec()).unwrap(); f(c_str.as_ptr()) } @@ -778,7 +778,7 @@ impl Window { MouseCursor::AllScroll | MouseCursor::ZoomIn | MouseCursor::ZoomOut => "left_ptr", }; - let c_string = CString::from_slice(cursor_name.as_bytes()); + let c_string = CString::new(cursor_name.as_bytes().to_vec()).unwrap(); let xcursor = ffi::XcursorLibraryLoadCursor(self.x.display, c_string.as_ptr()); ffi::XDefineCursor (self.x.display, self.x.window, xcursor); ffi::XFlush(self.x.display); |