rtchallenge: Address cargo clippy.

This commit is contained in:
2022-06-24 14:54:27 -07:00
parent e574cdb592
commit 5e7139f0ba
6 changed files with 21 additions and 24 deletions

View File

@@ -48,7 +48,7 @@ impl Canvas {
{
let path = Path::new(path.as_ref());
let file = File::create(path)?;
let ref mut w = BufWriter::new(file);
let w = &mut BufWriter::new(file);
let mut encoder = png::Encoder::new(w, self.width as u32, self.height as u32);
encoder.set_color(png::ColorType::RGB);