diff options
| author | Richard Janis Goldschmidt <janis.beckert@gmail.com> | 2016-09-11 16:48:04 +0200 |
|---|---|---|
| committer | Richard Janis Goldschmidt <janis.beckert@gmail.com> | 2016-09-11 16:48:04 +0200 |
| commit | c8b656bea5e90f1e174bee7e65cbd362914264b3 (patch) | |
| tree | eb000426ffe6e69eec92c1a8ea2cb17f5c04a19f /src/test/incremental/thinlto | |
| parent | 1fca1ab0e7be574022b2d229f0a6ad9bd580d1bf (diff) | |
| download | rust-c8b656bea5e90f1e174bee7e65cbd362914264b3.tar.gz rust-c8b656bea5e90f1e174bee7e65cbd362914264b3.zip | |
Remove unnecessary `cmp::min` from BufWriter::write
The first branch of the if statement already checks if `buf.len() >= self.buf.capacity()`, which makes the `cmp::min(buf.len(), self.buf.capacity())` redundant: the result will always be `buf.len()`. Therefore, we can pass the `buf` slice directly into `Write::write`.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
