From 947ccaad0477c1b04b210739832d50ab9ae7d8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 3 Aug 2018 05:19:42 +0200 Subject: [PATCH] fix more clippy warnings found by "cargo clippy --all-targets --all-features" (#130) --- src/deflate/mod.rs | 2 +- tests/flags.rs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) 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,