diff --git a/src/comm/comm.rs b/src/comm/comm.rs index 600922f25..670c56c1e 100644 --- a/src/comm/comm.rs +++ b/src/comm/comm.rs @@ -14,7 +14,7 @@ extern crate getopts; use std::cmp::Ord; use std::io::{BufferedReader, IoResult, print}; use std::io::fs::File; -use std::io::stdio::{stdin, StdReader}; +use std::io::stdio::{stdin, StdinReader}; use std::path::Path; static NAME : &'static str = "comm"; @@ -45,7 +45,7 @@ fn ensure_nl(line: String) -> String { } enum LineReader { - Stdin(BufferedReader), + Stdin(StdinReader), FileIn(BufferedReader) } diff --git a/src/factor/factor.rs b/src/factor/factor.rs index 757b01932..5cb9b85fb 100644 --- a/src/factor/factor.rs +++ b/src/factor/factor.rs @@ -13,8 +13,9 @@ extern crate getopts; extern crate libc; -use std::vec::{Vec}; -use std::io::{stdin}; +use std::vec::Vec; +use std::io::BufferedReader; +use std::io::stdio::stdin_raw; #[path="../common/util.rs"] mod util; @@ -91,7 +92,7 @@ pub fn uumain(args: Vec) -> int { } if matches.free.is_empty() { - for line in stdin().lines() { + for line in BufferedReader::new(stdin_raw()).lines() { print_factors_str(line.unwrap().as_slice().trim()); } } else { diff --git a/src/mv/mv.rs b/src/mv/mv.rs index fa43ac7c3..02e770e10 100644 --- a/src/mv/mv.rs +++ b/src/mv/mv.rs @@ -10,7 +10,7 @@ * that was distributed with this source code. */ -#![feature(macro_rules, if_let)] +#![feature(macro_rules)] extern crate getopts; diff --git a/src/rm/rm.rs b/src/rm/rm.rs index 6fdc7916b..2433dcaee 100644 --- a/src/rm/rm.rs +++ b/src/rm/rm.rs @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -#![feature(if_let, macro_rules)] +#![feature(macro_rules)] extern crate getopts; extern crate libc; diff --git a/src/tail/tail.rs b/src/tail/tail.rs index 83168fd0b..6dbd10694 100644 --- a/src/tail/tail.rs +++ b/src/tail/tail.rs @@ -9,7 +9,7 @@ * */ -#![feature(if_let, macro_rules)] +#![feature(macro_rules)] extern crate getopts; diff --git a/src/tr/tr.rs b/src/tr/tr.rs index 157c0fa55..337711833 100644 --- a/src/tr/tr.rs +++ b/src/tr/tr.rs @@ -16,8 +16,8 @@ extern crate getopts; use getopts::OptGroup; use std::char::from_u32; use std::collections::{BitvSet, VecMap}; -use std::io::print; -use std::io::stdio::{stdin,stdout}; +use std::io::{BufferedReader, print}; +use std::io::stdio::{stdin_raw, stdout}; use std::iter::FromIterator; use std::vec::Vec; @@ -101,7 +101,7 @@ fn delete(set: Vec, complement: bool) { |c: char| !bset.contains(&(c as uint)) }; - for c in stdin().chars() { + for c in BufferedReader::new(stdin_raw()).chars() { match c { Ok(c) if is_allowed(c) => out.write_char(c).unwrap(), Ok(_) => (), @@ -126,7 +126,7 @@ fn tr(set1: &[char], set2: &[char]) { } } - for c in stdin().chars() { + for c in BufferedReader::new(stdin_raw()).chars() { match c { Ok(inc) => { let trc = match map.get(&(inc as uint)) {