Skip to content

Commit

Permalink
clean up example err handling
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Jul 10, 2018
1 parent cdf166b commit c63366d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ struct Cli {
port: Port,
}

fn main() {
fn main() -> Result<(), std::io::Error> {
let args = Cli::from_args();
let tcp_listener = args.port.bind().unwrap();
let tcp_listener = args.port.bind()?;
println!("{:?}", tcp_listener);
Ok(())
}

0 comments on commit c63366d

Please sign in to comment.