From d7d79556a82a4d7742a8ef6d3921e4876c627b29 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Wed, 28 May 2014 14:47:46 +0200 Subject: [PATCH] head: unwrap IoResult before printing --- head/head.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/head/head.rs b/head/head.rs index 150732bd5..886264d48 100644 --- a/head/head.rs +++ b/head/head.rs @@ -127,7 +127,7 @@ fn obsolete (options: &[String]) -> (Vec, Option) { } fn head (reader: &mut BufferedReader, 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 () {