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

Make UdpStream block until the next non-empty msg and deprecate it. #18130

Merged
merged 2 commits into from
Oct 27, 2014
Merged

Make UdpStream block until the next non-empty msg and deprecate it. #18130

merged 2 commits into from
Oct 27, 2014

Conversation

mahkoh
Copy link
Contributor

@mahkoh mahkoh commented Oct 17, 2014

Closes #18111

Note that the non-empty part doesn't matter right now because of #18129.

@alexcrichton
Copy link
Member

Can you elaborate more on why you only return if nread > 0? I would expect this to just pass through nread so long as src == dst.

@mahkoh
Copy link
Contributor Author

mahkoh commented Oct 17, 2014

Because of #18079. After investigating the Readers in the stdlib, I think that UdpStream is the only one that can ever return Ok(0).

UdpStream is already a lossy convenience wrapper.

@mahkoh mahkoh changed the title Make UdpStream block until the next non-empty msg. Make UdpStream block until the next non-empty msg and deprecate it. Oct 17, 2014
@mahkoh
Copy link
Contributor Author

mahkoh commented Oct 17, 2014

I've updated the PR. UdpStream is now deprecated for the reasons outlined in the docs.

@alexcrichton
Copy link
Member

cc @aturon, @brson, what do you guys think about deprecating this (I'm ok with this)

@mahkoh
Copy link
Contributor Author

mahkoh commented Oct 25, 2014

Updated.

bors added a commit that referenced this pull request Oct 27, 2014
Closes #18111

Note that the non-empty part doesn't matter right now because of #18129.
@bors bors closed this Oct 27, 2014
@bors bors merged commit d6dc01e into rust-lang:master Oct 27, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Sep 25, 2024
…eykril

fix: Don't complete `;` when in closure return expression

Completing it will break syntax.

Fixes rust-lang#18130.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When UdpStream receives a message from the wrong sender, it returns Ok(0),
3 participants