From 24bc7b9bedd0da8e664e143c468e9f1405ded2f3 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 13 Apr 2017 02:42:37 +0200 Subject: main.rs: Add `try!` around STDERR writer The call to write to STDERR returns a `Result`. Wrap it in a `try!` to handle the result and eliminate the "unused result" compilation warning. --- 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 c7137f6..fcd9cfd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,7 @@ fn open_stream() -> io::Result<()> { println!("{}", url); } Err(e) => { - write!(io::stderr(), "{}", e); + write!(io::stderr(), "{}", e)?; } } } -- cgit v1.2.3