From 2538551892c1430f497104c65bdb97519464d438 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 28 Nov 2023 12:04:44 +0100 Subject: [PATCH] Fix new lint warning in clippy_config --- clippy_config/src/conf.rs | 4 +++- clippy_dev/src/update_lints.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clippy_config/src/conf.rs b/clippy_config/src/conf.rs index 88611eb70878..fbf09a18d13f 100644 --- a/clippy_config/src/conf.rs +++ b/clippy_config/src/conf.rs @@ -173,7 +173,9 @@ macro_rules! define_Conf { } })* // ignore contents of the third_party key - Ok(Field::third_party) => drop(map.next_value::()) + Ok(Field::third_party) => { + let _ = map.next_value::(); + } } } let conf = Conf { $($name: $name.unwrap_or_else(defaults::$name),)* }; diff --git a/clippy_dev/src/update_lints.rs b/clippy_dev/src/update_lints.rs index 6b76a44debff..4ce2cc8dd230 100644 --- a/clippy_dev/src/update_lints.rs +++ b/clippy_dev/src/update_lints.rs @@ -999,7 +999,7 @@ fn try_rename_file(old_name: &Path, new_name: &Path) -> bool { match fs::rename(old_name, new_name) { Ok(()) => true, Err(e) => { - drop(fs::remove_file(new_name)); + let _ = fs::remove_file(new_name); if e.kind() == io::ErrorKind::NotFound { false } else {