-
Couldn't load subscription status.
- Fork 13.9k
std: Stabilize portions of the io module
#23010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
52c199a to
40f4d04
Compare
|
LGTM, really excited to be reaching this stage! |
40f4d04 to
0dfa997
Compare
The new `io` module has had some time to bake and this commit stabilizes some of
the utilities associated with it. This commit also deprecates a number of
`std::old_io::util` functions and structures.
These items are now `#[stable]`
* `Cursor`
* `Cursor::{new, into_inner, get_ref, get_mut, position, set_position}`
* Implementations of I/O traits for `Cursor<T>`
* Delegating implementations of I/O traits for references and `Box` pointers
* Implementations of I/O traits for primitives like slices and `Vec<T>`
* `ReadExt::bytes`
* `Bytes` (and impls)
* `ReadExt::chain`
* `Chain` (and impls)
* `ReadExt::take` (and impls)
* `BufReadExt::lines`
* `Lines` (and impls)
* `io::copy`
* `io::{empty, Empty}` (and impls)
* `io::{sink, Sink}` (and impls)
* `io::{repeat, Repeat}` (and impls)
These items remain `#[unstable]`
* Core I/O traits. These may want a little bit more time to bake along with the
commonly used methods like `read_to_end`.
* `BufReadExt::split` - this function may be renamed to not conflict with
`SliceExt::split`.
* `Error` - there are a number of questions about its representation,
`ErrorKind`, and usability.
These items are now `#[deprecated]` in `old_io`
* `LimitReader` - use `take` instead
* `NullWriter` - use `io::sink` instead
* `ZeroReader` - use `io::repeat` instead
* `NullReader` - use `io::empty` instead
* `MultiWriter` - use `broadcast` instead
* `ChainedReader` - use `chain` instead
* `TeeReader` - use `tee` instead
* `copy` - use `io::copy` instead
[breaking-change]
|
@bors: r=aturon 0dafa997 |
|
🙀 |
|
⌛ Testing commit 0dfa997 with merge fc05d6a... |
|
💔 Test failed - auto-linux-64-x-android-t |
|
@bors: retry |
1 similar comment
|
@bors: retry |
… r=aturon
The new `io` module has had some time to bake and this commit stabilizes some of
the utilities associated with it. This commit also deprecates a number of
`std::old_io::util` functions and structures.
These items are now `#[stable]`
* `Cursor`
* `Cursor::{new, into_inner, get_ref, get_mut, position, set_position}`
* Implementations of I/O traits for `Cursor<T>`
* Delegating implementations of I/O traits for references and `Box` pointers
* Implementations of I/O traits for primitives like slices and `Vec<T>`
* `ReadExt::bytes`
* `Bytes` (and impls)
* `ReadExt::chain`
* `Chain` (and impls)
* `ReadExt::take` (and impls)
* `BufReadExt::lines`
* `Lines` (and impls)
* `io::copy`
* `io::{empty, Empty}` (and impls)
* `io::{sink, Sink}` (and impls)
* `io::{repeat, Repeat}` (and impls)
These items remain `#[unstable]`
* Core I/O traits. These may want a little bit more time to bake along with the
commonly used methods like `read_to_end`.
* `BufReadExt::split` - this function may be renamed to not conflict with
`SliceExt::split`.
* `Error` - there are a number of questions about its representation,
`ErrorKind`, and usability.
These items are now `#[deprecated]` in `old_io`
* `LimitReader` - use `take` instead
* `NullWriter` - use `io::sink` instead
* `ZeroReader` - use `io::repeat` instead
* `NullReader` - use `io::empty` instead
* `MultiWriter` - use `broadcast` instead
* `ChainedReader` - use `chain` instead
* `TeeReader` - use `tee` instead
* `copy` - use `io::copy` instead
[breaking-change]
The new
iomodule has had some time to bake and this commit stabilizes some ofthe utilities associated with it. This commit also deprecates a number of
std::old_io::utilfunctions and structures.These items are now
#[stable]CursorCursor::{new, into_inner, get_ref, get_mut, position, set_position}Cursor<T>BoxpointersVec<T>ReadExt::bytesBytes(and impls)ReadExt::chainChain(and impls)ReadExt::take(and impls)BufReadExt::linesLines(and impls)io::copyio::{empty, Empty}(and impls)io::{sink, Sink}(and impls)io::{repeat, Repeat}(and impls)These items remain
#[unstable]commonly used methods like
read_to_end.BufReadExt::split- this function may be renamed to not conflict withSliceExt::split.Error- there are a number of questions about its representation,ErrorKind, and usability.These items are now
#[deprecated]inold_ioLimitReader- usetakeinsteadNullWriter- useio::sinkinsteadZeroReader- useio::repeatinsteadNullReader- useio::emptyinsteadMultiWriter- usebroadcastinsteadChainedReader- usechaininsteadTeeReader- useteeinsteadcopy- useio::copyinstead[breaking-change]