rust/library/std/src/io
Mara 68f2934a15
Rollup merge of #82728 - calebsander:refactor/bufreader-buf, r=m-ou-se
Avoid unnecessary Vec construction in BufReader

As mentioned in #80460, creating a `Vec` and calling `Vec::into_boxed_slice()` emits unnecessary calls to `realloc()` and `free()`. Updated the code to use `Box::new_uninit_slice()` to create a boxed slice directly. I think this also makes it more explicit that the initial contents of the buffer are uninitialized.

r? ``@m-ou-se``
2021-03-05 10:57:20 +01:00
..
buffered Rollup merge of #82728 - calebsander:refactor/bufreader-buf, r=m-ou-se 2021-03-05 10:57:20 +01:00
cursor Make some std::io functions const 2020-11-06 17:48:26 +01:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
impls std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
stdio std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
util specialize io::copy to use the memory of the writer if it is a BufWriter 2021-01-31 14:58:03 +01:00
copy.rs library: Normalize safety-for-unsafe-block comments 2021-02-24 06:13:42 +01:00
cursor.rs Add tracking issue 2020-11-06 18:04:52 +01:00
error.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
impls.rs std: impl of Write for &mut [u8]: document the buffer full error 2020-12-04 18:38:44 +00:00
mod.rs Rollup merge of #81136 - Xavientois:io_reader_size_hint, r=cramertj 2021-03-05 10:57:17 +01:00
prelude.rs Use heading for std::prelude and not io::prelude 2021-01-05 17:52:24 -08:00
stdio.rs Add missing "see its documentation for more" stdio 2021-02-22 18:48:32 +08:00
tests.rs Add tests for SizeHint implementations 2021-01-31 08:34:42 -05:00
util.rs Fix line length format 2021-01-31 08:52:57 -05:00