Rollup merge of #36397 - SuperFluffy:bufwriter_unnecessary_cmp, r=aturon
Rollup merge of #36397 - SuperFluffy:bufwriter_unnecessary_cmp, r=aturon

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`.

GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust