mirror of
https://github.com/uutils/coreutils.git
synced 2026-05-06 07:26:38 -04:00
Merge pull request #196 from ebfe/fix-head
head: unwrap IoResult before printing
This commit is contained in:
+1
-1
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user