Skip to content
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

Merged
merged 2 commits into from
Nov 28, 2017

Conversation

ia0
Copy link
Contributor

@ia0 ia0 commented Oct 24, 2017

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.

@rust-highfive
Copy link
Collaborator

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.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Oct 25, 2017
@carols10cents
Copy link
Member

ping for review @aturon ! pinging you in chat too!

@ia0
Copy link
Contributor Author

ia0 commented Oct 30, 2017

For completeness, I also added a conversion from SendError to TrySendError in the second and currently last commit.

@shepmaster
Copy link
Member

Reassigning to new libs team member...

r? @BurntSushi

@rust-highfive rust-highfive assigned BurntSushi and unassigned aturon Nov 3, 2017
@BurntSushi
Copy link
Member

BurntSushi commented Nov 7, 2017

This seems reasonable to me.

@rfcbot fcp merge

@shepmaster
Copy link
Member

@BurntSushi It sounds like the fcp call-to-action needs to be on it's own line. I edited your comment, but no joy 😸.

@kennytm kennytm added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2017
@kennytm
Copy link
Member

kennytm commented Nov 12, 2017

Hi @rust-lang/libs, it seems @rfcbot isn't responding, could anyone re-issue the FCP request?

@dtolnay
Copy link
Member

dtolnay commented Nov 12, 2017

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Nov 12, 2017

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.

@rfcbot rfcbot added the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Nov 12, 2017
@rfcbot
Copy link

rfcbot commented Nov 21, 2017

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Nov 21, 2017
@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Nov 23, 2017
@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Nov 27, 2017

📌 Commit 448215d has been approved by alexcrichton

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2017
kennytm added a commit to kennytm/rust that referenced this pull request Nov 27, 2017
…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 added a commit that referenced this pull request Nov 27, 2017
Rollup of 10 pull requests

- Successful merges: #45506, #46174, #46231, #46240, #46249, #46258, #46262, #46275, #46282, #46285
- Failed merges:
@Mark-Simulacrum
Copy link
Member

@bors rollup

@Mark-Simulacrum
Copy link
Member

@ia0 Since this will land into the 1.24 release train, would you be interested in changing the since annotation (preferably in another PR to avoid rollup confusion)? If not, please file an issue to make sure that happens.

@bors bors merged commit 448215d into rust-lang:master Nov 28, 2017
@ia0 ia0 deleted the mpsc_recv_error_from branch November 28, 2017 09:53
@ia0
Copy link
Contributor Author

ia0 commented Nov 28, 2017

Thanks for the information @Mark-Simulacrum. I created #46323 to fix the issue.

kennytm added a commit to kennytm/rust that referenced this pull request Nov 29, 2017
Fix since for mpsc_error_conversions

This is a followup of rust-lang#45506.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.