Uh oh!
There was an error while loading. Please reload this page.
Improve docs for UdpSocket::set_nonblocking. - #45449
Merged
Merged
Conversation
rust-highfive
commented
Oct 22, 2017
Contributor
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
frewsxcv
commented
Oct 22, 2017
ContributorAuthor
@sfackler one more here when you have a moment |
Member
There was a problem hiding this comment.
Would it be simpler to not connect and use send_to/recv_from instead?
frewsxcv
commented
Oct 22, 2017
ContributorAuthor
@sfackler thanks for the review! comments addressed in the latest commit |
kennytm
requested changes
Oct 25, 2017
Member
There was a problem hiding this comment.
CI is failing. Note that .recv_from returns a Result<(usize, SocketAddr)>, not Result<usize>.
[01:04:03] ---- net/udp.rs - net::udp::UdpSocket::set_nonblocking (line 742) stdout ----
[01:04:03] error[E0277]: the trait bound `std::ops::RangeTo<(usize, std::net::SocketAddr)>: std::slice::SliceIndex<[u8]>` is not satisfied
[01:04:03] --> net/udp.rs:23:26
[01:04:03] |
[01:04:03] 23 | println!("bytes: {:?}", &buf[..num_bytes_read]);
[01:04:03] | ^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
[01:04:03] |
[01:04:03] = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `std::ops::RangeTo<(usize, std::net::SocketAddr)>`
[01:04:03] = note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeTo<(usize, std::net::SocketAddr)>>` for `[u8]`
[01:04:03] [01:04:03] thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:287:12
[01:04:03] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:04:03] [01:04:03] [01:04:03] failures:
[01:04:03] net/udp.rs - net::udp::UdpSocket::set_nonblocking (line 742)
[01:04:03] [01:04:03] test result: FAILED. 876 passed; 1 failed; 10 ignored; 0 measured; 0 filtered out
frewsxcvforce-pushed
the
frewsxcv-udp-nonblocking
branch
from
October 26, 2017 14:06
15d8c28 to
04f27f0Comparefrewsxcv
commented
Oct 27, 2017
ContributorAuthor
ci passes now |
sfackler
commented
Oct 27, 2017
Member
@bors r+ rollup |
bors
commented
Oct 27, 2017
Collaborator
📌 Commit 04f27f0 has been approved by |
kennytm
approved these changes
Oct 27, 2017
frewsxcv added a commit
to frewsxcv/rust
that referenced
this pull request
Oct 28, 2017
…r=sfackler Improve docs for UdpSocket::set_nonblocking. Closesrust-lang#44050.
kennytm added a commit
to kennytm/rust
that referenced
this pull request
Oct 28, 2017
…r=sfackler Improve docs for UdpSocket::set_nonblocking. Closesrust-lang#44050.
bors added a commit
that referenced
this pull request
Oct 28, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes#44050.