From 51e3797ebc8268c61b50bb1eac858efdae992f67 Mon Sep 17 00:00:00 2001 From: Austin Henriksen Date: Thu, 30 Apr 2026 23:31:14 -0400 Subject: [PATCH] `bufreader::Buffer`: Remove leftover note about `initialized` field https://github.com/rust-lang/rust/pull/150129 reworked this field to use `bool` instead of `usize`, which is awesome! But the field's comment has a leftover note in it which is no longer true, and that needs to be removed. --- library/std/src/io/buffered/bufreader/buffer.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/std/src/io/buffered/bufreader/buffer.rs b/library/std/src/io/buffered/bufreader/buffer.rs index 314f39225e65..f2efcc5ab860 100644 --- a/library/std/src/io/buffered/bufreader/buffer.rs +++ b/library/std/src/io/buffered/bufreader/buffer.rs @@ -23,9 +23,8 @@ pub struct Buffer { filled: usize, // Whether `buf` has been fully initialized. We track this so that we can accurately tell // `read_buf` how many bytes of buf are initialized, to bypass as much of its defensive - // initialization as possible. Note that while this often the same as `filled`, it doesn't need - // to be. Calls to `fill_buf` are not required to actually fill the buffer, and omitting this - // is a huge perf regression for `Read` impls that do not. + // initialization as possible. Calls to `fill_buf` are not required to actually fill the buffer, + // and omitting this is a huge perf regression for `Read` impls that do not. initialized: bool, }