]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #45506 - ia0:mpsc_recv_error_from, r=alexcrichton
authorkennytm <kennytm@gmail.com>
Mon, 27 Nov 2017 19:16:41 +0000 (03:16 +0800)
committerGitHub <noreply@github.com>
Mon, 27 Nov 2017 19:16:41 +0000 (03:16 +0800)
Implement From<RecvError> for TryRecvError and RecvTimeoutError

According to the documentation, it looks to me that `TryRecvError` and `RecvTimeoutError` are strict extensions of `RecvError`. As such, it makes sense to allow conversion from the latter type to the two former types without constraining future developments.

This permits to write `input.recv()?` and `input.recv_timeout(timeout)?` in the same function for example.


Trivial merge