<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/io/buffered/bufreader/buffer.rs, branch auto</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=auto</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=auto'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-17T19:13:05+00:00</updated>
<entry>
<title>bufreader::Buffer::backshift: don't move the uninit bytes</title>
<updated>2025-08-17T19:13:05+00:00</updated>
<author>
<name>binarycat</name>
<email>binarycat@envs.net</email>
</author>
<published>2025-08-17T19:13:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ab19755630ea6eb3c2f2a364300380ab01eff923'/>
<id>urn:sha1:ab19755630ea6eb3c2f2a364300380ab01eff923</id>
<content type='text'>
previous code was perfectly sound because of MaybeUninit,
but it did waste cycles on copying memory that is
known to be uninitialized.
</content>
</entry>
<entry>
<title>io: Avoid Avoid marking bytes as uninit in `BufReader::peek`</title>
<updated>2025-03-31T22:08:02+00:00</updated>
<author>
<name>Benoît du Garreau</name>
<email>benoit@dugarreau.fr</email>
</author>
<published>2025-03-28T14:52:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=878786848fdbe29325e9172d0ab86ed964eca7a6'/>
<id>urn:sha1:878786848fdbe29325e9172d0ab86ed964eca7a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix logic error in Buffer::read_more()</title>
<updated>2025-03-01T01:36:19+00:00</updated>
<author>
<name>Will Woods</name>
<email>w@wizard.zone</email>
</author>
<published>2025-03-01T01:36:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6d07144613ffb54e6856bd5543acfe5e12eb3447'/>
<id>urn:sha1:6d07144613ffb54e6856bd5543acfe5e12eb3447</id>
<content type='text'>
Buffer::read_more() is supposed to refill the buffer without discarding
its contents, which are in the range `pos .. filled`.

It mistakenly borrows the range `pos ..`, fills that, and then
increments `filled` by the amount read. This overwrites the buffer's
existing contents and sets `filled` to a too-large value that either
exposes uninitialized bytes or walks off the end of the buffer entirely.

This patch makes it correctly fill only the unfilled portion of the
buffer, which should maintain all the type invariants and fix the test
failure introduced in commit b1196717fcb.
</content>
</entry>
<entry>
<title>Add inherent versions of MaybeUninit methods for slices</title>
<updated>2025-01-12T04:57:00+00:00</updated>
<author>
<name>ltdk</name>
<email>usr@ltdk.xyz</email>
</author>
<published>2024-08-18T23:50:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e37daf0c868efc016dd8039d59d53a03303c9c07'/>
<id>urn:sha1:e37daf0c868efc016dd8039d59d53a03303c9c07</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: update internal uses of `io::const_error!`</title>
<updated>2024-11-26T17:38:24+00:00</updated>
<author>
<name>joboet</name>
<email>jonasboettiger@icloud.com</email>
</author>
<published>2024-11-25T12:49:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c14d137bfc5133f5a38fad2f58e30fed9c47ffe2'/>
<id>urn:sha1:c14d137bfc5133f5a38fad2f58e30fed9c47ffe2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #125404 - a1phyr:fix-read_buf-uses, r=workingjubilee</title>
<updated>2024-09-28T07:35:08+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-09-28T07:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6e9db86787e09e9a15a0d3b9a317fb2d0fc33de9'/>
<id>urn:sha1:6e9db86787e09e9a15a0d3b9a317fb2d0fc33de9</id>
<content type='text'>
Fix `read_buf` uses in `std`

Following lib-team decision here: https://github.com/rust-lang/rust/issues/78485#issuecomment-2122992314

Guard against the pathological behavior of both returning an error and performing a read.
</content>
</entry>
<entry>
<title>Pre-allocate buffers in `File::open_buffered` and `create_buffered`</title>
<updated>2024-09-24T20:33:31+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2024-09-24T20:33:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1e9a50dde8fe417348a9e4c74787975527502ec3'/>
<id>urn:sha1:1e9a50dde8fe417348a9e4c74787975527502ec3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix `io::BufReader` uses of `read_buf`</title>
<updated>2024-09-23T20:51:27+00:00</updated>
<author>
<name>Benoît du Garreau</name>
<email>bdgdlm@outlook.com</email>
</author>
<published>2024-05-22T09:41:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=04710e27d260b82865b3d4949e2e84b59c35ed66'/>
<id>urn:sha1:04710e27d260b82865b3d4949e2e84b59c35ed66</id>
<content type='text'>
</content>
</entry>
<entry>
<title>properly handle EOF in BufReader::peek</title>
<updated>2024-09-06T20:28:22+00:00</updated>
<author>
<name>binarycat</name>
<email>binarycat@envs.net</email>
</author>
<published>2024-09-06T20:28:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dfdbf6343ae1ea97b504b36ec1933e181ec7198e'/>
<id>urn:sha1:dfdbf6343ae1ea97b504b36ec1933e181ec7198e</id>
<content type='text'>
previously this would cause an infinite loop due to it being
unable to read `n` bytes.
</content>
</entry>
<entry>
<title>implement BufReader::peek</title>
<updated>2024-08-05T19:44:54+00:00</updated>
<author>
<name>binarycat</name>
<email>binarycat@envs.net</email>
</author>
<published>2024-07-30T18:27:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4af77dfea5290b0053efcb31cad774cabf71af59'/>
<id>urn:sha1:4af77dfea5290b0053efcb31cad774cabf71af59</id>
<content type='text'>
</content>
</entry>
</feed>
