mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Remove unnecessary tmp variable in default_read_exact
This variable seems to serve no purpose, and it's a little confusing when reading std source code, so remove it.
This commit is contained in:
parent
4ea5190026
commit
dca90f7ec1
@ -513,8 +513,7 @@ pub(crate) fn default_read_exact<R: Read + ?Sized>(this: &mut R, mut buf: &mut [
|
||||
match this.read(buf) {
|
||||
Ok(0) => break,
|
||||
Ok(n) => {
|
||||
let tmp = buf;
|
||||
buf = &mut tmp[n..];
|
||||
buf = &mut buf[n..];
|
||||
}
|
||||
Err(ref e) if e.is_interrupted() => {}
|
||||
Err(e) => return Err(e),
|
||||
|
Loading…
Reference in New Issue
Block a user