-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement From<RecvError> for TryRecvError and RecvTimeoutError #45506
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
ping for review @aturon ! pinging you in chat too! |
For completeness, I also added a conversion from SendError to TrySendError in the second and currently last commit. |
Reassigning to new libs team member... r? @BurntSushi |
This seems reasonable to me. @rfcbot fcp merge |
@BurntSushi It sounds like the fcp call-to-action needs to be on it's own line. I edited your comment, but no joy 😸. |
Hi @rust-lang/libs, it seems @rfcbot isn't responding, could anyone re-issue the FCP request? |
@rfcbot fcp merge |
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
@bors: r+ Thanks! |
📌 Commit 448215d has been approved by |
…chton 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.
@bors rollup |
@ia0 Since this will land into the 1.24 release train, would you be interested in changing the |
Thanks for the information @Mark-Simulacrum. I created #46323 to fix the issue. |
Fix since for mpsc_error_conversions This is a followup of rust-lang#45506.
According to the documentation, it looks to me that
TryRecvError
andRecvTimeoutError
are strict extensions ofRecvError
. 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()?
andinput.recv_timeout(timeout)?
in the same function for example.