diff options
author | Teddy Wing | 2017-04-13 02:25:01 +0200 |
---|---|---|
committer | Teddy Wing | 2017-04-13 02:25:01 +0200 |
commit | c805780c2c7653137a5dece9111aa4efb57b4ce9 (patch) | |
tree | bfb86fca1da908ad60ba247d36475bbab3f44b3a /src | |
parent | 22be6a59a676f85a767d7421a980b965cdcdea35 (diff) | |
download | HearURL-c805780c2c7653137a5dece9111aa4efb57b4ce9.tar.bz2 |
main.rs: Write TCP stream errors to STDERR
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 63e6f50..956a0fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use std::io; +use std::io::{self, Write}; use std::io::prelude::*; use std::net::{TcpListener, TcpStream}; @@ -13,7 +13,9 @@ fn open_stream() -> io::Result<()> { println!("{}", url); } - Err(e) => {} + Err(e) => { + write!(io::stderr(), "{}", e); + } } } |