Skip to content

Commit

Permalink
Resolve semicolon_if_nothing_returned clippy lints
Browse files Browse the repository at this point in the history
    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
  • Loading branch information
dtolnay committed Jun 5, 2021
1 parent e4057c7 commit df1fb71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Map<String, Value> {
/// 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.
Expand Down
4 changes: 2 additions & 2 deletions src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ where
}

fn discard(&mut self) {
R::discard(self)
R::discard(self);
}

fn position(&self) -> Position {
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit df1fb71

Please sign in to comment.