From fdddbbf8a600dd48f3fb7fd9b10e717bba08ea0b Mon Sep 17 00:00:00 2001 From: Slatian Date: Sun, 19 Oct 2025 16:36:17 +0200 Subject: [PATCH] Adapt to new clippy lints preferring variables inside the format string --- src/core/method.rs | 2 +- src/error.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/method.rs b/src/core/method.rs index 8c40266..f4872c4 100644 --- a/src/core/method.rs +++ b/src/core/method.rs @@ -31,7 +31,7 @@ impl fmt::Display for Method { Method::Alphabet => "Alphabet", Method::Combined => "Combined", }; - write!(f, "{}", name) + write!(f, "{name}") } } diff --git a/src/error.rs b/src/error.rs index 79cec51..9caacac 100644 --- a/src/error.rs +++ b/src/error.rs @@ -12,13 +12,13 @@ impl Display for ParseError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { ParseError::Script(val) => { - write!(f, "Cannot parse str into whatlang::Script: {:?}", val) + write!(f, "Cannot parse str into whatlang::Script: {val:?}") } ParseError::Lang(val) => { - write!(f, "Cannot parse str into whatlang::Lang: {:?}", val) + write!(f, "Cannot parse str into whatlang::Lang: {val:?}") } ParseError::Method(val) => { - write!(f, "Cannot parse str into whatlang::Method: {:?}", val) + write!(f, "Cannot parse str into whatlang::Method: {val:?}") } } }