From ccbfe4d13273b93bf84daf11548e536105afff24 Mon Sep 17 00:00:00 2001 From: Sven Assmann Date: Fri, 7 May 2021 21:34:34 +0200 Subject: [PATCH] chore(clippy): make clippy happy --- Cargo.lock | 4 ++-- stegano-cli/Cargo.toml | 4 ++-- stegano-core/Cargo.toml | 2 +- stegano-core/src/bit_iterator.rs | 5 +---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70449e4..63fb91f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -821,7 +821,7 @@ dependencies = [ [[package]] name = "stegano-cli" -version = "0.4.8" +version = "0.4.9" dependencies = [ "clap", "stegano-core", @@ -829,7 +829,7 @@ dependencies = [ [[package]] name = "stegano-core" -version = "0.4.8" +version = "0.4.9" dependencies = [ "bitstream-io", "byteorder", diff --git a/stegano-cli/Cargo.toml b/stegano-cli/Cargo.toml index 8953205..e20eacc 100644 --- a/stegano-cli/Cargo.toml +++ b/stegano-cli/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "stegano-cli" description = "Hiding secret data with steganography in PNG images and WAV audio files" -version = "0.4.8" +version = "0.4.9" authors = ["Sven Assmann "] edition = "2018" license = "GPL-3.0-only" @@ -17,7 +17,7 @@ travis-ci = { repository = "steganogram/stegano-rs", branch = "main" } maintenance = { status = "actively-developed" } [dependencies] -stegano-core = { path = "../stegano-core", version = "0.4.8" } +stegano-core = { path = "../stegano-core", version = "0.4.9" } #stegano-core = "0.4.5" clap = "2.33" diff --git a/stegano-core/Cargo.toml b/stegano-core/Cargo.toml index f7e5d53..618462a 100644 --- a/stegano-core/Cargo.toml +++ b/stegano-core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "stegano-core" description = "Steganography core library for stegano-cli. Supports hiding data in PNG images via LSB Encoding." -version = "0.4.8" +version = "0.4.9" authors = ["Sven Assmann "] edition = "2018" license = "GPL-3.0-only" diff --git a/stegano-core/src/bit_iterator.rs b/stegano-core/src/bit_iterator.rs index 1c9f138..08523b8 100644 --- a/stegano-core/src/bit_iterator.rs +++ b/stegano-core/src/bit_iterator.rs @@ -45,10 +45,7 @@ where Err(_) => None, }; } - return match self.byte { - None => None, - Some(b) => Some((b >> bit) & 1), - }; + return self.byte.map(|b| (b >> bit) & 1); } } }