Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
mahkoh:udp
Oct 27, 2014
Merged

Make UdpStream block until the next non-empty msg and deprecate it.#18130
bors merged 2 commits into
rust-lang:masterfrom
mahkoh:udp

Conversation

@mahkoh

Copy link
Copy Markdown
Contributor

Closes#18111

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

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Copy link
Copy Markdown
ContributorAuthor

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

@alexcrichton

Copy link
Copy Markdown
Member

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

@mahkoh

Copy link
Copy Markdown
ContributorAuthor

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.
@borsbors closed this Oct 27, 2014
@bors
bors merged commit d6dc01e into rust-lang:masterOct 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.
Fixesrust-lang#18130.
Sign up for freeto 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

@mahkoh@alexcrichton@bors