From 6e29f04d660da1305400c72f1719829425f15e3c Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Sun, 7 Apr 2024 12:26:28 -0700 Subject: [PATCH 1/3] Quieten clippy warning about references I'm not sure it's really an improvement though, see https://github.com/rust-lang/rust-clippy/issues/9782 --- src/fnvalue.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fnvalue.rs b/src/fnvalue.rs index 7252c4cc..1e8a0b73 100644 --- a/src/fnvalue.rs +++ b/src/fnvalue.rs @@ -328,10 +328,10 @@ fn known_map(path: &Path) -> Option<(&Ident, &Type, &Type)> { { // TODO: Skip lifetime args. // TODO: Return the path with args stripped out. - if let Some((GenericArgument::Type(key_type), GenericArgument::Type(value_type))) = + if let Some((GenericArgument::Type(ref key_type), GenericArgument::Type(ref value_type))) = args.iter().collect_tuple() { - return Some((&last.ident, &key_type, &value_type)); + return Some((&last.ident, key_type, value_type)); } } None From 925c3ff68e13fbc3288832f732f2e4a4f4dbd4f7 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Sun, 7 Apr 2024 12:29:52 -0700 Subject: [PATCH 2/3] Use clone_into #clippy From dba2cab3c875630f46b291944e47197d0972218a Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Sun, 7 Apr 2024 12:35:42 -0700 Subject: [PATCH 3/3] Avoid deprecated whoami::hostname --- src/output.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.rs b/src/output.rs index d32c03a2..b3578826 100644 --- a/src/output.rs +++ b/src/output.rs @@ -42,7 +42,7 @@ impl LockFile { LockFile { cargo_mutants_version: crate::VERSION.to_string(), start_time, - hostname: whoami::hostname(), + hostname: whoami::fallible::hostname().unwrap_or_default(), username: whoami::username(), } }