RingBuf -> VecDeque for other platforms, as_slice_with_nul -> as_bytes_with_nul
This commit is contained in:
parent
9bb41bf277
commit
0389c834e4
7 changed files with 18 additions and 18 deletions
|
|
@ -9,7 +9,7 @@ use events::ElementState::{Pressed, Released};
|
|||
use events::Event::{MouseInput, MouseMoved};
|
||||
use events::MouseButton;
|
||||
|
||||
use std::collections::RingBuf;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use Api;
|
||||
use BuilderAttribs;
|
||||
|
|
@ -26,8 +26,8 @@ pub struct MonitorID;
|
|||
|
||||
mod ffi;
|
||||
|
||||
pub fn get_available_monitors() -> RingBuf <MonitorID> {
|
||||
let mut rb = RingBuf::new();
|
||||
pub fn get_available_monitors() -> VecDeque <MonitorID> {
|
||||
let mut rb = VecDeque::new();
|
||||
rb.push_back(MonitorID);
|
||||
rb
|
||||
}
|
||||
|
|
@ -313,7 +313,7 @@ impl Window {
|
|||
|
||||
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_bytes_with_nul().as_ptr();
|
||||
unsafe {
|
||||
ffi::egl::GetProcAddress(addr) as *const ()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue