summary refs log tree commit diff
path: root/library/std/src/io/impls.rs
AgeCommit message (Collapse)AuthorLines
2024-01-29Handle out of memory errors in io:Read::read_to_end()Kornel-2/+3
2023-11-15Substitute version placeholdersMark Rousskov-1/+1
2023-11-09Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io`John Millikin-0/+14
Assigned new feature name `core_io_borrowed_buf` to distinguish from the `Read::read_buf` functionality in `std::io`.
2023-10-15Auto merge of #110604 - a1phyr:vecdeque_buf_read, r=dtolnaybors-0/+18
Implement `BufRead` for `VecDeque<u8>` Note: it would become insta-stable
2023-04-21Rollup merge of #110633 - scottmcm:more-take, r=thomccDylan DPC-1/+1
More `mem::take` in `library` A bunch of places were using `replace(…, &mut [])`, but that can just be `take`.
2023-04-20More `mem::take` in `library`Scott McMurray-1/+1
A bunch of places were using `replace(…, &mut [])`, but that can just be `take`.
2023-04-20Specialize some `io::Read` and `io::Write` methods for `VecDeque<u8>` and ↵Benoît du Garreau-0/+54
`&[u8]`
2023-04-20Implement `BufRead` for `VecDeque<u8>`Benoît du Garreau-0/+18
2022-08-18Address reviewer commentsNick Cameron-4/+4
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-08-05non-linux platformsNick Cameron-7/+7
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-08-04std::io: migrate ReadBuf to BorrowBuf/BorrowCursorNick Cameron-8/+8
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-09Remove redundant calls to reserve in impl Write for VecDequePaolo Barbolini-2/+0
2022-05-19impl Read and Write for VecDeque<u8>Evan Richter-0/+48
* For read and read_buf, only the front slice of a discontiguous VecDeque is copied. The VecDeque is advanced after reading, making any back slice available for reading with a second call to Read::read(_buf). * For write, the VecDeque always appends the entire slice to the end, growing its allocation when necessary.
2022-02-04Hide Repr details from io::Error, and rework `io::Error::new_const`.Thom Chiovoloni-3/+6
2021-11-02read_bufDrMeepster-16/+22
2021-06-07Forwarding implementation for Seek trait's stream_position methodmyshylin-0/+10
2021-03-21Use io::Error::new_const everywhere to avoid allocations.Mara Bos-2/+2
2021-03-07Generalize Write impl for Vec<u8> to Vec<u8, A>Joel Höner-1/+2
As discussed in the issue tracker for the wg-allocators working group[1], updating this implementation for allocator support was most likely just forgotten in the original PR. [1]: https://github.com/rust-lang/wg-allocators/issues/86
2020-12-04std: impl of `Write` for `&mut [u8]`: document the buffer full errorIan Jackson-0/+4
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-11-10Remove io::LocalOutput and use Arc<Mutex<dyn>> for local streams.Mara Bos-14/+0
2020-10-22Capture output from threads spawned in testsTyler Mandry-3/+3
Fixes #42474.
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-61/+3
Also doing fmt inplace as requested.
2020-07-27mv std libs to library/mark-0/+460