Skip to content

Commit ac8de22

Browse files
authored
Rollup merge of rust-lang#121543 - onur-ozkan:clippy-args, r=oli-obk
various clippy fixes We need to keep the order of the given clippy lint rules before passing them. Since clap doesn't offer any useful interface for this purpose out of the box, we have to handle it manually. Additionally, this PR makes `-D` rules work as expected. Previously, lint rules were limited to `-W`. By enabling `-D`, clippy began to complain numerous lines in the tree, all of which have been resolved in this PR as well. Fixes rust-lang#121481 cc `@matthiaskrgr`
2 parents 66b9f79 + 0bdf2a8 commit ac8de22

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

std/src/io/buffered/bufreader.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,9 @@ impl<R: ?Sized + Read> Read for BufReader<R> {
328328
self.discard_buffer();
329329
return self.inner.read_vectored(bufs);
330330
}
331-
let nread = {
332-
let mut rem = self.fill_buf()?;
333-
rem.read_vectored(bufs)?
334-
};
331+
let mut rem = self.fill_buf()?;
332+
let nread = rem.read_vectored(bufs)?;
333+
335334
self.consume(nread);
336335
Ok(nread)
337336
}

0 commit comments

Comments
 (0)