From c627b719b2c13ae4d735f43a71081ed064dee04c Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Tue, 11 Jun 2024 17:58:03 +0100 Subject: [PATCH] Fix the clippy issue See https://github.com/rust-lang/rust-clippy/issues/12454 --- vello_tests/src/lib.rs | 2 +- vello_tests/src/snapshot.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/vello_tests/src/lib.rs b/vello_tests/src/lib.rs index b3a6ca53e..910853ba1 100644 --- a/vello_tests/src/lib.rs +++ b/vello_tests/src/lib.rs @@ -153,7 +153,7 @@ pub fn write_png_to_file( ) -> Result<(), anyhow::Error> { let width = params.width; let height = params.height; - let mut file = File::create(&out_path)?; + let mut file = File::create(out_path)?; let mut encoder = png::Encoder::new(&mut file, width, height); encoder.set_color(png::ColorType::Rgba); encoder.set_depth(png::BitDepth::Eight); diff --git a/vello_tests/src/snapshot.rs b/vello_tests/src/snapshot.rs index f4289396c..69106e91a 100644 --- a/vello_tests/src/snapshot.rs +++ b/vello_tests/src/snapshot.rs @@ -83,6 +83,9 @@ impl Snapshot<'_> { } } +/// Run a snapshot test. +/// +/// Try and keep the width and height small, to reduce the size of committed binary data pub fn snapshot_test_sync(scene: Scene, params: &TestParams) -> Result> { pollster::block_on(snapshot_test(scene, params)) }