From 44ae9e77d5ac8ad5b342b6b4238689ed74571052 Mon Sep 17 00:00:00 2001 From: xermicus Date: Fri, 26 Apr 2024 10:39:56 +0200 Subject: [PATCH] clippies Signed-off-by: xermicus --- crates/integration/src/cases.rs | 2 +- .../statement/expression/function_call/verbatim.rs | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/crates/integration/src/cases.rs b/crates/integration/src/cases.rs index 47ff03b..9ec9363 100644 --- a/crates/integration/src/cases.rs +++ b/crates/integration/src/cases.rs @@ -154,7 +154,7 @@ mod tests { let p = (new - old) / new * 100.0; format!("({p}% change from {old} bytes)") }) - .unwrap_or_else(String::new); + .unwrap_or_default(); println!("{name}: {bytes} bytes {change}"); } diff --git a/crates/solidity/src/yul/parser/statement/expression/function_call/verbatim.rs b/crates/solidity/src/yul/parser/statement/expression/function_call/verbatim.rs index 2e1bd77..be64e8d 100644 --- a/crates/solidity/src/yul/parser/statement/expression/function_call/verbatim.rs +++ b/crates/solidity/src/yul/parser/statement/expression/function_call/verbatim.rs @@ -28,11 +28,10 @@ where .original .take() .ok_or_else(|| anyhow::anyhow!("{} Verbatim literal is missing", call.location))?; - match identifier.as_str() { - _ => anyhow::bail!( - "{} Found unknown internal function `{}`", - call.location, - identifier - ), - } + + anyhow::bail!( + "{} Found unknown internal function `{}`", + call.location, + identifier + ) }