Emmanuel Gil Peyrot
cdfb5cb4bf
Add missing semicolons and question marks
2019-11-24 15:31:43 +01:00
Emmanuel Gil Peyrot
3a2da7194c
Return Ok(()) in docstrings in std::os::unix::net
2019-11-24 13:55:03 +01:00
Emmanuel Gil Peyrot
8f158bc62b
Replace .unwrap() with ? in std::os::unix::net
2019-11-24 13:55:03 +01:00
Jeremy Stucki
47ea8ae022
Remove needless lifetimes
2019-07-01 12:15:27 +02:00
Josh Stone
3ba1f39fe7
Avoid mem::uninitialized() in std::sys::unix
...
For `libc` types that will be initialized in FFI calls, we can just use
`MaybeUninit` and then pass around raw pointers.
For `sun_path_offset()`, which really wants `offset_of`, all callers
have a real `sockaddr_un` available, so we can use that reference.
2019-06-26 15:03:15 -07:00
Marcel Hellwig
cc314b066a
Remove bitrig support from rust
2019-05-13 11:09:06 +02:00
Steven Fackler
bd177f3ea3
Stabilized vectored IO
...
This renames `std::io::IoVec` to `std::io::IoSlice` and
`std::io::IoVecMut` to `std::io::IoSliceMut`, and stabilizes
`std::io::IoSlice`, `std::io::IoSliceMut`,
`std::io::Read::read_vectored`, and `std::io::Write::write_vectored`.
Closes #58452
2019-04-27 08:34:08 -07:00
Mazdak Farrokhzad
379c380a60
libstd: deny(elided_lifetimes_in_paths)
2019-03-31 12:56:51 +02:00
Taiki Endo
93b6d9e086
libstd => 2018
2019-02-28 04:06:15 +09:00
Steven Fackler
31bcec648a
Add vectored read and write support
...
This functionality has lived for a while in the tokio ecosystem, where
it can improve performance by minimizing copies.
2019-02-13 19:40:17 -08:00
Alexander Regueiro
99ed06eb88
libs: doc comments
2019-02-10 23:57:25 +00:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Alexander Regueiro
ee89c088b0
Various minor/cosmetic improvements to code
2018-12-07 23:53:34 +00:00
Josh Stone
f107514aef
Deal with EINTR in net timeout tests
...
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.
2018-11-30 15:33:40 -08:00
jD91mZM2
abac5e722f
Revert unification of interfaces
2018-07-07 06:50:55 +02:00
jD91mZM2
79bf00f406
Fix tidy checks
2018-06-27 15:10:00 +02:00
jD91mZM2
a4e190546c
Horrible attempt at cleaning things up that probably just made it worse
2018-06-27 10:12:34 +02:00
jD91mZM2
c86a7a01e2
Mention redox' behavior in doc comments
2018-06-26 20:31:35 +02:00
Nicholas Rishel
da6142c810
Rustfmt result (for relevant changes) to satisfy Travis line length check.
...
Signed-off-by: Nicholas Rishel <nick@accups.com >
2018-04-19 17:27:05 -04:00
Nicholas Rishel
c7f3621f0e
The prior check causes abstract unix domain sockets to return unnamed on Android.
...
Signed-off-by: Nicholas Rishel <nick@accups.com >
2018-04-19 15:55:02 -04:00
Daniel Kolsoi
fdde09c70c
Reduce scope of unsafe block in sun_path_offset
2018-03-23 17:01:34 -04:00
Manish Goregaokar
8bf026df5b
Rollup merge of #48328 - frewsxcv:frewsxcv-clarify-error-zero-duration, r=sfackler
...
Fixes #47311 .
r? @nrc
2018-03-02 22:01:20 -08:00
kennytm
1aa103511b
Rollup merge of #48330 - frewsxcv:frewsxcv-tests-zero-duration, r=sfackler
...
Add tests ensuring zero-Duration timeouts result in errors; fix Redox issues.
Part of #48311
2018-02-25 22:47:56 +08:00
Corey Farwell
0700bd12d0
Clarify "It is an error to..." wording for zero-duration behaviors.
...
Documentation fix side of https://github.com/rust-lang/rust/issues/48311 .
2018-02-24 08:56:36 -05:00
Corey Farwell
d17d645ad7
Add tests ensuring zero-Duration timeouts result in errors.
...
Part of https://github.com/rust-lang/rust/issues/48311
2018-02-18 21:42:02 -05:00
Corey Farwell
472dcdb4ec
Fix broken documentation link.
2018-02-17 20:57:00 -05:00
Tobias Schaffner
2ccaeff582
Refactoring: move net specific fd imps to net
...
Move the implementations of net specific file descriptior implementations
to net. This makes it easier to exclude net at all if not needed for a
target.
2017-08-16 13:27:20 +02:00
Zack M. Davis
1b6c9605e4
use field init shorthand EVERYWHERE
...
Like #43008 (f668999 ), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
Guillaume Gomez
bc6659a8fe
Rollup merge of #43814 - Eijebong:fix_typos2, r=petrochenkov
...
Fix some typos
Follow up of #43794
If refined my script a little bit and found some more.
2017-08-13 11:03:11 +02:00
bors
0ed03e5490
Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichton
...
Expose all OS-specific modules in libstd doc.
1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc.
2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness.
3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed.
Fixes #24658 (Does _not_ fully implement #1998 ).
2017-08-13 03:00:20 +00:00
Bastien Orivel
3ab86fbab2
Fix some typos
2017-08-12 14:01:11 +02:00
kennytm
3093bb85f9
Fix error during cross-platform documentation.
2017-08-12 12:07:39 +08:00
Foucher
27d7e61f1b
Fix typo corersponding -> corresponding
2017-08-10 08:49:40 +02:00
Steven Fackler
ecbb896b9e
Add Read::initializer.
...
This is an API that allows types to indicate that they can be passed
buffers of uninitialized memory which can improve performance.
2017-06-20 20:26:22 -07:00
Marco A L Barbosa
b45c631382
Fix libc::bind call on aarch64-linux-android
2017-03-25 11:03:06 -03:00
Corey Farwell
dee6989b43
Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnik
...
Update usages of 'OSX' (and other old names) to 'macOS'.
As of last year with version 'Sierra', the Mac operating system is now
called 'macOS'.
2017-03-17 08:48:52 -04:00
Corey Farwell
e7b0f2badf
Remove function invokation parens from documentation links.
...
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
2017-03-13 21:43:18 -04:00
Corey Farwell
97a1b6a055
Update usages of 'OSX' (and other old names) to 'macOS'.
...
As of last year with version 'Sierra', the Mac operating system is now
called 'macOS'.
2017-03-12 14:59:04 -04:00
Alex Crichton
214a6c6166
Fix compile errors and such
2016-12-20 14:09:50 -08:00
Guillaume Gomez
2938e6a411
Add missing doc examples for UnixDatagram
2016-12-16 11:14:16 +01:00
Guillaume Gomez
a78a33c52a
Add Incoming doc examples
2016-12-08 09:43:38 -08:00
Guillaume Gomez
c35b9f6703
Add UnixListener doc examples
2016-12-08 09:43:38 -08:00
Guillaume Gomez
7fe17f96d5
Add doc examples for UnixStream
2016-12-08 09:43:33 -08:00
Guillaume Gomez
9976f5f7c5
Add missing doc examples for SocketAddr struct
2016-12-08 09:38:43 -08:00
Mathieu Poumeyrol
14f9cbdfd5
use MSG_NOSIGNAL on all relevant platforms
2016-10-09 13:01:29 +02:00
bors
5045d4e396
Auto merge of #36824 - kali:master, r=alexcrichton
...
SO_NOSIGPIPE and MSG_NOSIGNAL (rebased #36426 )
I'm not sure what happened when I pushed a rebased branch on #36426 , github closed it...
2016-10-01 01:19:47 -07:00
Brian Anderson
096670ca41
Ignore various entire test modules on emscripten
2016-09-30 14:02:56 -07:00
Brian Anderson
9c4a01ee9e
Ignore lots and lots of std tests on emscripten
2016-09-30 14:02:48 -07:00
Mathieu Poumeyrol
5980d5bfdd
use MSG_NOSIGNAL from liblibc
2016-09-28 19:44:20 +02:00
Mathieu Poumeyrol
ed5e542819
MSG_NOSIGNAL on linux
2016-09-28 19:43:11 +02:00