From d9d293667a7b5934ba923f578ffbfd2c12d121be Mon Sep 17 00:00:00 2001 From: Tomaka17 Date: Thu, 31 Jul 2014 10:52:05 +0200 Subject: Add monitor support for win32 --- examples/fullscreen.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index cfbc35c..b6141a0 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -14,8 +14,9 @@ fn main() { } print!("Please write the number of the monitor to use: "); - let num = from_str(stdin().read_line().unwrap().as_slice()).unwrap(); - let monitor = init::get_available_monitors().nth(num).unwrap(); + let num = from_str(stdin().read_line().unwrap().as_slice().trim()) + .expect("Plase enter a number"); + let monitor = init::get_available_monitors().nth(num).expect("Please enter a valid ID"); println!("Using {}", monitor.get_name()); -- cgit v1.2.3