aboutsummaryrefslogtreecommitdiffstats
path: root/src/cocoa/monitor.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-02-21 18:11:02 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-02-21 18:11:02 +0100
commit06eab6f6c0ad2d8085e2074c47967f770e49792a (patch)
tree862f0b3320c22d8cd5b7283203b71f10b66dab7d /src/cocoa/monitor.rs
parent7ff76cddd981d64fbf0f821ba8a5f456fd0fcb29 (diff)
parent1055eed078f674ad4cc657e99a247310183d635e (diff)
downloadglutin-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/cocoa/monitor.rs')
-rw-r--r--src/cocoa/monitor.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cocoa/monitor.rs b/src/cocoa/monitor.rs
index 912c02d..47adc03 100644
--- a/src/cocoa/monitor.rs
+++ b/src/cocoa/monitor.rs
@@ -1,10 +1,10 @@
use core_graphics::display;
-use std::collections::RingBuf;
+use std::collections::VecDeque;
pub struct MonitorID(u32);
-pub fn get_available_monitors() -> RingBuf<MonitorID> {
- let mut monitors = RingBuf::new();
+pub fn get_available_monitors() -> VecDeque<MonitorID> {
+ let mut monitors = VecDeque::new();
unsafe {
let max_displays = 10u32;
let mut active_displays = [0u32; 10];
@@ -12,7 +12,7 @@ pub fn get_available_monitors() -> RingBuf<MonitorID> {
display::CGGetActiveDisplayList(max_displays,
&mut active_displays[0],
&mut display_count);
- for i in range(0us, display_count as usize) {
+ for i in range(0, display_count as usize) {
monitors.push_back(MonitorID(active_displays[i]));
}
}