From e12f06ad485404a2b0d4ce4bb58ee174e9102b3a Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 24 Apr 2015 09:25:39 +0200 Subject: [PATCH] Fix and re-enable the fullscreen example --- {examples-disabled => examples}/fullscreen.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename {examples-disabled => examples}/fullscreen.rs (87%) diff --git a/examples-disabled/fullscreen.rs b/examples/fullscreen.rs similarity index 87% rename from examples-disabled/fullscreen.rs rename to examples/fullscreen.rs index 3b9e2c1e..d64224b1 100644 --- a/examples-disabled/fullscreen.rs +++ b/examples/fullscreen.rs @@ -4,7 +4,7 @@ extern crate android_glue; extern crate glutin; -use std::old_io::stdio::stdin; +use std::io; mod support; @@ -23,8 +23,10 @@ fn main() { } print!("Please write the number of the monitor to use: "); - let num = stdin().read_line().unwrap().as_slice().trim().parse() - .ok().expect("Please enter a number"); + + let mut num = String::new(); + io::stdin().read_line(&mut num).unwrap(); + let num = num.trim().parse().ok().expect("Please enter a number"); let monitor = glutin::get_available_monitors().nth(num).expect("Please enter a valid ID"); println!("Using {:?}", monitor.get_name());