| Age | Commit message (Collapse) | Author | Lines |
|
|
|
On unix like systems, the underlying file corresponding to any given path may
change at any time. This function makes it possible to set the permissions of
the a file corresponding to a `File` object even if its path changes.
|
|
|
|
|
|
libstd: support creation of anonymous pipe on WinXP/2K3
`PIPE_REJECT_REMOTE_CLIENTS` flag is not supported on Windows < VISTA, and every invocation of `anon_pipe` including attempts to pipe `std::process::Child`'s stdio fails.
This PR should work around this issue by performing a runtime check of windows version and conditionally omitting this flag on "XP and friends".
Getting the version should be probably moved out of the function `anon_pipe` itself (the OS version does not often change during runtime :) ), but:
- I didn't find any precedent for this and assuming there's not much overhead (I hope windows does not perform any heuristics to find out it's own version, just fills couple of fields in the struct).
- the code path is not especially performance sensitive anyway.
|
|
|
|
|
|
Add missing examples in SocketAddr
r? @frewsxcv
|
|
|
|
Add std::process::abort
This calls libc abort on Unix and fastfail on Windows, first running
cleanups to do things like flush stdout buffers. This matches with libc
abort's behavior, which flushes open files.
r? @alexcrichton
|
|
|
|
This calls libc abort on Unix and fastfail on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std: Derive `Default` for `Duration`.
Discussed in #37546 the libs team reached the conclusion that a default zero
duration seems like a reasonable implementation of the `Default` trait.
Closes #37546
|
|
Remove one bounds check from BufReader
Very minor thing. Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
CC #37573
|
|
r=alexcrichton
Add Error implementation for std::sync::mpsc::RecvTimeoutError.
Fixes https://github.com/rust-lang/rust/issues/37525.
|
|
|
|
|
|
|
|
|
|
Discussed in #37546 the libs team reached the conclusion that a default zero
duration seems like a reasonable implementation of the `Default` trait.
Closes #37546
|
|
Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
|
|
|
|
|
|
Slightly optimise CString
Avoid a reallocation in CString::from and CStr::to_owned.
|
|
Clarify that send_to might panic in certain cases
Closes #34202
r? @alexcrichton
|
|
Closes #34202
|
|
Add missing urls on io structs
r? @steveklabnik
|
|
Avoid a reallocation in CString::from and CStr::to_owned.
|
|
Stabilize `..` in tuple (struct) patterns
I'd like to nominate `..` in tuple and tuple struct patterns for stabilization.
This feature is a relatively small extension to existing stable functionality and doesn't have known blockers.
The feature first appeared in Rust 1.10 6 months ago.
An example of use: https://github.com/rust-lang/rust/pull/36203
Closes https://github.com/rust-lang/rust/issues/33627
r? @nikomatsakis
|
|
std: Track change to cprng syscall signature (Fuchsia)
The mx_cprng_draw syscall has changed signature to separate the status
and size return values, rather than multiplexing them into a single
value with errors interpreted as a negative value. This patch tracks
that change.
|
|
Change `Into<Vec<u8>> for String` and `Into<OsString> for PathBuf` to From
Fixes #37561. First contribution, happy with any and all feedback!
|
|
Add missing urls for ErrorKind's variants
r? @steveklabnik
|
|
Don't reuse RandomState seeds
cc #36481
|
|
|
|
The mx_cprng_draw syscall has changed signature to separate the status
and size return values, rather than multiplexing them into a single
value with errors interpreted as a negative value. This patch tracks
that change.
|
|
|
|
Add conversions from `io:ErrorKind` to `io::Error`
Filing to help with discussion around the possibility of doing this.
Current changes are clearly backwards incompatible, but I think adding a new function (with a bikeshed on naming) like `Error::new_str` should be possible (or some other way of specializing the string error message case) to fix #36658.
|
|
|