From 63427f7a1236174886abf63efab69942fc3628b6 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 29 Nov 2024 09:40:57 +0100 Subject: [PATCH] Apply suggestions from clippy 1.83 --- askama_derive/src/generator.rs | 2 +- askama_parser/src/lib.rs | 2 +- testing/tests/methods.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 811ae6a87..6d2283f9e 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -1990,7 +1990,7 @@ impl MapChain<'_, Cow<'_, str>, LocalMeta> { } } -impl<'a, K: Eq + hash::Hash, V> Default for MapChain<'a, K, V> { +impl Default for MapChain<'_, K, V> { fn default() -> Self { Self { parent: None, diff --git a/askama_parser/src/lib.rs b/askama_parser/src/lib.rs index c5e4bb447..09218aa25 100644 --- a/askama_parser/src/lib.rs +++ b/askama_parser/src/lib.rs @@ -279,7 +279,7 @@ fn skip_till<'a, O>( } } -fn keyword<'a>(k: &'a str) -> impl FnMut(&'a str) -> ParseResult<'_> { +fn keyword<'a>(k: &'a str) -> impl FnMut(&'a str) -> ParseResult<'a> { move |i: &'a str| -> ParseResult<'a> { let (j, v) = identifier(i)?; if k == v { diff --git a/testing/tests/methods.rs b/testing/tests/methods.rs index 09f91e6b1..b9c8942ca 100644 --- a/testing/tests/methods.rs +++ b/testing/tests/methods.rs @@ -6,7 +6,7 @@ struct SelfMethodTemplate<'a> { s: &'a str, } -impl<'a> SelfMethodTemplate<'a> { +impl SelfMethodTemplate<'_> { fn get_s(&self) -> &str { self.s } @@ -40,7 +40,7 @@ struct NestedSelfMethodTemplate<'a> { t: SelfMethodTemplate<'a>, } -impl<'a> NestedSelfMethodTemplate<'a> { +impl NestedSelfMethodTemplate<'_> { fn get_s(&self) -> &str { "bar" }