Skip to content

Commit

Permalink
Fix some new 1.83 clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrimmel committed Nov 30, 2024
1 parent 0279c8d commit 1ac748f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/valgrind/xml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand All @@ -183,7 +183,7 @@ fn deserialize_hex<'de, D: Deserializer<'de>>(deserializer: D) -> Result<u64, D:

/// A visitor for parsing a `u64` in the format `0xDEADBEEF`.
struct HexVisitor;
impl<'de> Visitor<'de> for HexVisitor {
impl Visitor<'_> for HexVisitor {
type Value = u64;

fn expecting(&self, f: &mut Formatter) -> fmt::Result {
Expand Down

0 comments on commit 1ac748f

Please sign in to comment.