From 10251070f75ab5b0faa8e746972a5d959bb0a6fe Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Mon, 28 Oct 2013 20:40:42 -0700 Subject: [PATCH] Upgrade Rust --- linux.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux.rs b/linux.rs index 5d30880..996cf0a 100644 --- a/linux.rs +++ b/linux.rs @@ -8,7 +8,8 @@ // except according to those terms. use AlertMethods; -use std::io; +use std::rt::io; +use std::rt::io::buffered::BufferedReader; /// An alert. pub struct Alert { @@ -23,7 +24,8 @@ impl AlertMethods for Alert { fn add_prompt(&mut self) { print("URL: "); - self.url = io::stdin().read_line(); + self.url = BufferedReader::new(io::stdin()) + .read_line().expect("Could not read URL from stdin"); } fn run(&self) {