1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

head: unwrap IoResult before printing

This commit is contained in:
Michael Gehring 2014-05-28 14:47:46 +02:00
parent 7f4a646e1f
commit d7d79556a8

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) { 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 () { fn version () {