diff --git a/src/deflate/mod.rs b/src/deflate/mod.rs index 6229eca9..ae51b847 100644 --- a/src/deflate/mod.rs +++ b/src/deflate/mod.rs @@ -89,7 +89,7 @@ pub fn cfzlib_deflate( } debug_assert!(stream.total_out as usize <= out.capacity()); out.set_len(stream.total_out as usize); - return Ok(out); + Ok(out) } } diff --git a/tests/flags.rs b/tests/flags.rs index 13ab2c63..049e88b7 100644 --- a/tests/flags.rs +++ b/tests/flags.rs @@ -23,8 +23,8 @@ fn get_opts(input: &Path) -> (OutFile, oxipng::Options) { fn test_it_converts( input: PathBuf, - output: OutFile, - opts: oxipng::Options, + output: &OutFile, + opts: &oxipng::Options, color_type_in: ColorType, bit_depth_in: BitDepth, color_type_out: ColorType, @@ -64,8 +64,8 @@ fn verbose_mode() { test_it_converts( input, - output, - opts, + &output, + &opts, ColorType::RGB, BitDepth::Eight, ColorType::RGB, @@ -378,8 +378,8 @@ fn preserve_attrs() { test_it_converts( input, - output, - opts, + &output, + &opts, ColorType::RGB, BitDepth::Eight, ColorType::RGB, @@ -430,8 +430,8 @@ fn zopfli_mode() { test_it_converts( input, - output, - opts, + &output, + &opts, ColorType::RGB, BitDepth::Eight, ColorType::RGB,