mirror of
https://github.com/uutils/coreutils
synced 2024-12-15 07:42:48 +00:00
Merge pull request #196 from ebfe/fix-head
head: unwrap IoResult before printing
This commit is contained in:
commit
6edb91f4a0
1 changed files with 1 additions and 1 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue