| Age | Commit message (Collapse) | Author | Lines |
|
|
|
This commit applies rustfmt with rust-lang/rust's default settings to
files in src/libstd *that are not involved in any currently open PR* to
minimize merge conflicts. THe list of files involved in open PRs was
determined by querying GitHub's GraphQL API with this script:
https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8
With the list of files from the script in outstanding_files, the
relevant commands were:
$ find src/libstd -name '*.rs' \
| xargs rustfmt --edition=2018 --unstable-features --skip-children
$ rg libstd outstanding_files | xargs git checkout --
Repeating this process several months apart should get us coverage of
most of the rest of libstd.
To confirm no funny business:
$ git checkout $THIS_COMMIT^
$ git show --pretty= --name-only $THIS_COMMIT \
| xargs rustfmt --edition=2018 --unstable-features --skip-children
$ git diff $THIS_COMMIT # there should be no difference
|
|
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
|
|
behavior), so skip the following tests:
net::tcp::tests::timeouts
net::udp::tests::timeouts
|
|
Affect is usually used as a verb, effect as a verb.
|
|
|
|
|
|
SGX target: fix std unit tests
This fixes some tests and some code in the SGX sys implementation to make the `std` unit test suite pass.
#59009 must be merged first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We've seen sporadic QE failures in the timeout tests on this assertion:
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
So there's an error, but not either of the expected kinds. Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).
For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption. For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
|
|
|
|
Fixes https://github.com/rust-lang/rust/issues/49233.
|
|
r=sfackler
Fixes #47311.
r? @nrc
|
|
Add tests ensuring zero-Duration timeouts result in errors; fix Redox issues.
Part of #48311
|
|
Documentation fix side of https://github.com/rust-lang/rust/issues/48311.
|
|
Part of https://github.com/rust-lang/rust/issues/48311
|
|
|
|
There are some tests that need to be disabled on CloudABI specifically,
due to the fact that the shims cannot be built in combination with
unix::ext or windows::ext. Also improve the scoping of some imports to
suppress compiler warnings.
|
|
Closes https://github.com/rust-lang/rust/issues/44050.
|
|
|
|
Clarify the behavior of UDP sockets wrt. multiple addresses in `connect`
CC @frewsxcv #22569 #44209
|
|
rustdoc: type-fixes
|
|
|
|
Fixes https://github.com/rust-lang/rust/issues/22569.
|
|
|
|
Closes #38863
Closes #38980
Closes #38903
Closes #36648
|
|
Part of #29363
|
|
This was never established as a convention we should follow in the 'More
API Documentation Conventions' RFC:
https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
|
|
Add peek APIs to std::net
Adds "peek" APIs to `std::net` sockets, including:
- `UdpSocket.peek()`
- `UdpSocket.peek_from()`
- `TcpStream.peek()`
These methods enable socket reads without side-effects. That is, repeated calls to `peek()` return identical data. This is accomplished by providing the POSIX flag `MSG_PEEK` to the underlying socket read operations.
This also moves the current implementation of `recv_from` out of the platform-independent `sys_common` and into respective `sys/windows` and `sys/unix` implementations. This allows for more platform-dependent implementations where necessary.
Fixes #38980
|
|
These methods enable socket reads without side-effects. That is,
repeated calls to peek() return identical data. This is accomplished
by providing the POSIX flag MSG_PEEK to the underlying socket read
operations.
This also moves the current implementation of recv_from out of the
platform-independent sys_common and into respective sys/windows and
sys/unix implementations. This allows for more platform-dependent
implementations.
|
|
See #38644.
|
|
|
|
Add more examples to UpdSocket
r? @frewsxcv
|
|
|
|
|
|
Closes #34202
|
|
|
|
|
|
|