From b11af1eccb5116b8901dd999f48210ce955ea9b7 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 24 Apr 2016 05:48:05 -0400 Subject: main: Change `unwrap` to `expect` Give us a better error message if a failure ever happens here. Was inspired by my experience in 2d1f7031f03194fbceffc15b1d6376abea243e22, where the `unwrap` calls gave no useful information. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 0732f6d..e2e0030 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,7 @@ fn main() { let stdin = io::stdin(); for line in stdin.lock().lines() { - let line = line.unwrap(); + let line = line.expect("Error reading from STDIN"); // Write the message to STDOUT so that it can be properly read by Mutt println!("{}", line); -- cgit v1.2.3