Skip to content

Commit

Permalink
Fix test for with_primary_monitor and with_connected_monitors changes
Browse files Browse the repository at this point in the history
  • Loading branch information
csherratt committed Jan 19, 2015
1 parent d02a199 commit 908425a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/modes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
extern crate glfw;

fn main() {
let glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap();
let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap();

glfw.with_primary_monitor(|monitor| {
glfw.with_primary_monitor(|_, monitor| {
let _ = monitor.map(|monitor| {
println!("{:?}:", monitor.get_name());
println!(" {:?}\n", monitor.get_video_mode().unwrap());
Expand All @@ -27,7 +27,7 @@ fn main() {

println!("Available monitors\n\
------------------");
glfw.with_connected_monitors(|monitors| {
glfw.with_connected_monitors(|_, monitors| {
for monitor in monitors.iter() {
println!("{:?}:", monitor.get_name());
for mode in monitor.get_video_modes().iter() {
Expand Down
4 changes: 2 additions & 2 deletions examples/monitors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ use glfw::{Action, Context, Key};
fn main() {
let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap();

glfw.with_connected_monitors(|monitors| {
glfw.with_connected_monitors(|_, monitors| {
for monitor in monitors.iter() {
println!("{:?}: {:?}", monitor.get_name(), monitor.get_video_mode());
}
});

let (mut window, events) = glfw.with_primary_monitor(|m| {
let (mut window, events) = glfw.with_primary_monitor(|glfw, m| {
glfw.create_window(300, 300, "Hello this is window",
m.map_or(glfw::WindowMode::Windowed, |m| glfw::WindowMode::FullScreen(m)))
}).expect("Failed to create GLFW window.");
Expand Down

0 comments on commit 908425a

Please sign in to comment.