Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Glad to hear it, especially since this isn't really the code you'd write most often; this is a library that frameworks will use. So it can be even more ergonomic...

> Does this code

So

    let sock = TcpListener::bind(&addr, &handle).unwrap();
Here, the bind method [1] will return an error if it can't bind to the port. unwrap will cause a panic to happen.

1: https://docs.rs/tokio-core/0.1.3/tokio_core/net/struct.TcpLi...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: