Merge pull request #196 from ebfe/fix-head

head: unwrap IoResult before printing
This commit is contained in:
Heather 2014-05-28 05:53:33 -07:00
commit 6edb91f4a0

View file

@ -127,7 +127,7 @@ fn obsolete (options: &[String]) -> (Vec<String>, Option<uint>) {
}
fn head<T: Reader> (reader: &mut BufferedReader<T>, line_count:uint) {
for line in reader.lines().take(line_count) { print!("{}", line); }
for line in reader.lines().take(line_count) { print!("{}", line.unwrap()); }
}
fn version () {