diff options
author | mitchmindtree <mitchell.nordine@gmail.com> | 2015-02-22 01:17:47 +1100 |
---|---|---|
committer | mitchmindtree <mitchell.nordine@gmail.com> | 2015-02-22 01:17:47 +1100 |
commit | 1055eed078f674ad4cc657e99a247310183d635e (patch) | |
tree | 862f0b3320c22d8cd5b7283203b71f10b66dab7d /src/win32 | |
parent | 0389c834e4b456ad6dcce4f687c69ab0e84beafa (diff) | |
download | glutin-1055eed078f674ad4cc657e99a247310183d635e.tar.gz glutin-1055eed078f674ad4cc657e99a247310183d635e.zip |
Removed as_slice_with_nul as CString now derefs to a CStr
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/init.rs | 2 | ||||
-rw-r--r-- | src/win32/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/win32/init.rs b/src/win32/init.rs index fd454d3..53fbc96 100644 --- a/src/win32/init.rs +++ b/src/win32/init.rs @@ -171,7 +171,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O use libc; let addr = CString::from_slice(addr.as_bytes()); - let addr = addr.as_bytes_with_nul().as_ptr(); + let addr = addr.as_ptr(); unsafe { gl::wgl::GetProcAddress(addr) as *const libc::c_void diff --git a/src/win32/mod.rs b/src/win32/mod.rs index e47c6eb..4846d59 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -192,7 +192,7 @@ impl Window { /// See the docs in the crate root file. pub fn get_proc_address(&self, addr: &str) -> *const () { let addr = CString::from_slice(addr.as_bytes()); - let addr = addr.as_bytes_with_nul().as_ptr(); + let addr = addr.as_ptr(); unsafe { let p = gl::wgl::GetProcAddress(addr) as *const (); |