From 1ac748ffa89af35b7accec940a996f441b72e298 Mon Sep 17 00:00:00 2001 From: Julian Frimmel Date: Sat, 30 Nov 2024 11:42:58 +0100 Subject: [PATCH] Fix some new 1.83 clippy lints --- src/valgrind/xml/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/valgrind/xml/mod.rs b/src/valgrind/xml/mod.rs index 98c3cd9..661e522 100644 --- a/src/valgrind/xml/mod.rs +++ b/src/valgrind/xml/mod.rs @@ -164,7 +164,7 @@ pub struct Frame { } impl Display for Frame { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - f.write_str(self.function.as_ref().unwrap_or(&"unknown".into()))?; + f.write_str(self.function.as_ref().map_or("unknown", |s| s.as_str()))?; if let Some(file) = &self.file { f.write_str(" (")?; f.write_str(file)?; @@ -183,7 +183,7 @@ fn deserialize_hex<'de, D: Deserializer<'de>>(deserializer: D) -> Result Visitor<'de> for HexVisitor { +impl Visitor<'_> for HexVisitor { type Value = u64; fn expecting(&self, f: &mut Formatter) -> fmt::Result {