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:
parent
7f4a646e1f
commit
d7d79556a8
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) {
|
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 () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue