From df1fb717badea8bda80f7e104d80265da0686166 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 4 Jun 2021 20:52:01 -0700 Subject: [PATCH] Resolve semicolon_if_nothing_returned clippy lints error: consider adding a `;` to the last statement for consistent formatting --> src/map.rs:55:9 | 55 | self.map.clear() | ^^^^^^^^^^^^^^^^ help: add a `;` here: `self.map.clear();` | note: the lint level is defined here --> src/lib.rs:304:22 | 304 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^^^^^^ = note: `#[deny(clippy::semicolon_if_nothing_returned)]` implied by `#[deny(clippy::pedantic)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned error: consider adding a `;` to the last statement for consistent formatting --> src/read.rs:719:9 | 719 | R::discard(self) | ^^^^^^^^^^^^^^^^ help: add a `;` here: `R::discard(self);` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned error: consider adding a `;` to the last statement for consistent formatting --> src/read.rs:769:9 | 769 | R::set_failed(self, failed) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `R::set_failed(self, failed);` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned --- src/map.rs | 2 +- src/read.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map.rs b/src/map.rs index b564446..c8fb503 100644 --- a/src/map.rs +++ b/src/map.rs @@ -52,7 +52,7 @@ impl Map { /// Clears the map, removing all values. #[inline] pub fn clear(&mut self) { - self.map.clear() + self.map.clear(); } /// Returns a reference to the value corresponding to the key. diff --git a/src/read.rs b/src/read.rs index d247c30..5a0e8f6 100644 --- a/src/read.rs +++ b/src/read.rs @@ -716,7 +716,7 @@ where } fn discard(&mut self) { - R::discard(self) + R::discard(self); } fn position(&self) -> Position { @@ -766,7 +766,7 @@ where const should_early_return_if_failed: bool = R::should_early_return_if_failed; fn set_failed(&mut self, failed: &mut bool) { - R::set_failed(self, failed) + R::set_failed(self, failed); } }