BufReader: In Seek impl, remove extra discard_buffer call#61157
BufReader: In Seek impl, remove extra discard_buffer call#61157bors merged 2 commits intorust-lang:masterfrom
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
Since this will be peer reviewed, I might as well ask: should this refactored to not use a |
|
It seems this was introduced in the original implementation. It's been dead code for a while. |
|
I tried to do the same when I added async BufReader in futures-rs, but that was not correct (rust-lang/futures-rs#1573 (comment)). There is no |
|
Mmh so it's because of the |
|
I'm going to add try to add a test so this behavior is ensured. |
Yeah, after early return with the next line's (If |
26635b7 to
f27ec0f
Compare
|
Cool. I undid my commit and added a test that fails without that line. |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
@bors r+ rollup -- thanks! |
|
📌 Commit b1ae49c has been approved by |
…a-discard_buffer, r=nikomatsakis BufReader: In Seek impl, remove extra discard_buffer call As far as I can tell, this code does nothing. I'm not sure why it even is there.
…a-discard_buffer, r=nikomatsakis BufReader: In Seek impl, remove extra discard_buffer call As far as I can tell, this code does nothing. I'm not sure why it even is there.
…a-discard_buffer, r=nikomatsakis BufReader: In Seek impl, remove extra discard_buffer call As far as I can tell, this code does nothing. I'm not sure why it even is there.
Rollup of 9 pull requests Successful merges: - #60742 (Allow const parameters in array sizes to be unified) - #60756 (Add better tests for hidden lifetimes in impl trait) - #60928 (Changes the type `mir::Mir` into `mir::Body`) - #61024 (tests: Centralize proc macros commonly used for testing) - #61157 (BufReader: In Seek impl, remove extra discard_buffer call) - #61195 (Special-case `.llvm` in mangler) - #61202 (Print PermissionExt::mode() in octal in Documentation Examples) - #61259 (Mailmap fixes) - #61273 (mention that MaybeUninit is a bit like Option) Failed merges: r? @ghost
As far as I can tell, this code does nothing. I'm not sure why it even is there.