From aa4809850d6a3e2ae10ffcbd9026a0e354b1e1b1 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Tue, 9 Sep 2025 10:32:15 -0700 Subject: [PATCH] Fix `mismatched_lifetime_syntaxes` warning ``` warning: hiding a lifetime that's elided elsewhere is confusing --> src/lru_list.rs:109:17 | 109 | pub fn iter(&self) -> LRUListIterator { | ^^^^^ ------------------ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: use `'_` for type paths | 109 | pub fn iter(&self) -> LRUListIterator<'_, T> { | +++ ``` --- src/lru_list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lru_list.rs b/src/lru_list.rs index 13fd110..3c72dbf 100644 --- a/src/lru_list.rs +++ b/src/lru_list.rs @@ -106,7 +106,7 @@ impl LRUList { }); } - pub fn iter(&self) -> LRUListIterator { + pub fn iter(&self) -> LRUListIterator<'_, T> { LRUListIterator:: { list: self, index: Self::OCCUPIED,