| Age | Commit message (Collapse) | Author | Lines |
|
This affects the `set_non_blocking` function which cannot fail for Unix or
Windows, given correct parameters. Additionally, the short UDP write error case
has been removed as there is no such thing as \"short UDP writes\", instead, the
operating system will error out if the application tries to send a packet
larger than the MTU of the network path.
|
|
Tests often use `vec![1, 2, 3]` instead of shorter and faster `[1, 2, 3]`.
This patch removes a lot of unnecessary `vec!`s. Hopefully, the tests will compile and run a bit faster.
|
|
|
|
|
|
|
|
There are no tests for this because testing inherit/null is tricky.
Probably why there weren't tests for it to begin with.
|
|
|
|
aarch64
|
|
|
|
|
|
The windows/unix modules were currently inconsistent about the traits being
implemented for `DirEntry` and there isn't much particular reason why the traits
*couldn't* be implemented for `ReadDir` and `DirEntry`, so this commit ensures
that they are implemented.
Closes #22577
|
|
Also includes some minor optimizations to the Vec and slice writers to remove the unnecessary loop.
|
|
This is a breaking change if missing docs are forbidden in any module or crate.
I had to add documentation to undocumented associated types in libstd and libcore, please let me know if the documentation is inadequate anywhere!
Fixes #20648
|
|
Integer audit in `libstd/thread_local/*`, part of #22240
|
|
fmt and hash are pretty straightforward I think. sync is a bit more complex. I thought one or two of the `isize`s ought to be `i32`s, but that would require a bunch of casting (the root cause being the lack of atomics other than isize/usize).
r? @alexcrichton
|
|
|
|
|
|
There are no tests for this because testing inherit/null is tricky.
Probably why there weren't tests for it to begin with.
|
|
Currently we have a `set_mode` mutator, so this just adds the pairing of a
`mode` accessor to read the value.
Closes #22738
|
|
If the filename for a path is `None` then we know that the creation of the
parent directory created the whole path so there's no need to retry the call to
`create_dir`.
Closes #22737
|
|
|
|
This affects the `set_non_blocking` function which cannot fail for Unix or
Windows, given correct parameters. Additionally, the short UDP write error case
has been removed as there is no such thing as "short UDP writes", instead, the
operating system will error out if the application tries to send a packet
larger than the MTU of the network path.
|
|
|
|
|
|
|
|
We can't call into the inner reader for a 0-byte read because that may
end up blocking or returning an error.
r? @alexcrichton
|
|
|
|
e. g.
```
let b: Box<Foo> = Box::from_raw(p);
```
instead of
```
let b: Box<Foo> = mem::transmute(p);
```
Patch also changes closure release code in `src/libstd/sys/unix/thread.rs`
when `pthread_create` failed. Raw pointer was transmuted to box of
`FnOnce()` instead of `Thunk`. This code was probably never executed,
because `pthread_create` rarely fails.
(And there are two more patches in PR: fix typo in doc and mark `from_raw` and `into_raw` functions inline.)
|
|
|
|
fix issue #22535
|
|
It looks like a few spots in the documentation were missed when renaming `Bitv` and `BitvSet`. This fixes the docs to use their current names.
|
|
And minor fixes to other docs.
r? @nikomatsakis
|
|
|
|
|
|
Please see discussion in #19284 .
|
|
... to convert between Box and raw pointers. E. g. use
```
let b: Box<Foo> = Box::from_raw(p);
```
instead of
```
let b: Box<Foo> = mem::transmute(p);
```
Patch also changes closure release code in `src/libstd/sys/unix/thread.rs`
when `pthread_create` failed. Raw pointer was transmuted to box of
`FnOnce()` instead of `Thunk`. This code was probably never executed,
because `pthread_create` rarely fails in practice.
|
|
|
|
This is not a complete implementation of the RFC:
- only existing methods got updated, no new ones added
- doc comments are not extensive enough yet
- optimizations got lost and need to be reimplemented
See https://github.com/rust-lang/rfcs/pull/528
Technically a
[breaking-change]
|
|
|
|
|
|
Add a basic test that checks that the types catch the most glaring
errors that could occur.
cc #22444
|
|
|
|
|
|
|
|
The commit 1860ee52 has break the openbsd build.
Repair it.
|
|
"body": null,
|
|
* Adds features and allows
* Removes unused muts, unused imports, dead code
* Migrates some deprecated code to new io/env
* Changes std::num::uint/int to be re-exports of std::num::usize/isize
libcollections, liballoc, and libcoretest no longer warn during testing.
libstd warns much less, though there's some dangly bits that weren't obvious fixes. In particular, how to only supress deprecated warnings in specific submodules of std.
|
|
|
|
|
|
|