diff options
| author | tomaka <pierre.krieger1708@gmail.com> | 2015-02-21 18:11:02 +0100 | 
|---|---|---|
| committer | tomaka <pierre.krieger1708@gmail.com> | 2015-02-21 18:11:02 +0100 | 
| commit | 06eab6f6c0ad2d8085e2074c47967f770e49792a (patch) | |
| tree | 862f0b3320c22d8cd5b7283203b71f10b66dab7d /src/win32 | |
| parent | 7ff76cddd981d64fbf0f821ba8a5f456fd0fcb29 (diff) | |
| parent | 1055eed078f674ad4cc657e99a247310183d635e (diff) | |
| download | glutin-06eab6f6c0ad2d8085e2074c47967f770e49792a.tar.gz glutin-06eab6f6c0ad2d8085e2074c47967f770e49792a.zip | |
Merge pull request #286 from mitchmindtree/master
Updated to latest nightly - RingBuf -> VecDeque, removed unnecessary as_slice_with_nul
Diffstat (limited to 'src/win32')
| -rw-r--r-- | src/win32/init.rs | 2 | ||||
| -rw-r--r-- | src/win32/mod.rs | 4 | ||||
| -rw-r--r-- | src/win32/monitor.rs | 6 | 
3 files changed, 6 insertions, 6 deletions
| diff --git a/src/win32/init.rs b/src/win32/init.rs index 246a6b7..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_slice_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 cfb573a..4846d59 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -1,7 +1,7 @@  use std::sync::atomic::AtomicBool;  use std::ptr;  use std::ffi::CString; -use std::collections::RingBuf; +use std::collections::VecDeque;  use std::sync::mpsc::Receiver;  use libc;  use {CreationError, Event, MouseCursor}; @@ -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_slice_with_nul().as_ptr(); +        let addr = addr.as_ptr();          unsafe {              let p = gl::wgl::GetProcAddress(addr) as *const (); diff --git a/src/win32/monitor.rs b/src/win32/monitor.rs index bcf27e2..fc9f20d 100644 --- a/src/win32/monitor.rs +++ b/src/win32/monitor.rs @@ -1,7 +1,7 @@  use winapi;  use user32; -use std::collections::RingBuf; +use std::collections::VecDeque;  /// Win32 implementation of the main `MonitorID` object.  pub struct MonitorID { @@ -25,11 +25,11 @@ pub struct MonitorID {  }  /// Win32 implementation of the main `get_available_monitors` function. -pub fn get_available_monitors() -> RingBuf<MonitorID> { +pub fn get_available_monitors() -> VecDeque<MonitorID> {      use std::{iter, mem, ptr};      // return value -    let mut result = RingBuf::new(); +    let mut result = VecDeque::new();      // enumerating the devices is done by querying device 0, then device 1, then device 2, etc.      //  until the query function returns null | 
