From 8072b86d763f09f624a475972f9538a47aeee88a Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 10 Sep 2025 13:01:30 -0400 Subject: impl FusedIterator on all our iterators --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index bec32c1..5f4a991 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,7 @@ use alloc::sync::Arc; use alloc::vec::Vec; use alloc::{format, vec}; use core::fmt; +use core::iter::FusedIterator; use core::mem::take; use core::sync::atomic::{AtomicBool, Ordering}; @@ -957,6 +958,8 @@ impl<'a> Iterator for ConfigurationIter<'a> { } } +impl FusedIterator for ConfigurationIter<'_> {} + /// Opaque type returned by [`Configuration::keys`]. #[derive(Clone, Debug)] pub struct Keys<'a> { @@ -977,6 +980,8 @@ impl<'a> Iterator for Keys<'a> { } } +impl FusedIterator for Keys<'_> {} + /// Opaque type returned by [`Configuration::unread_keys`]. #[derive(Clone, Debug)] pub struct UnreadKeys<'a>(ItemsIter<'a>); @@ -993,6 +998,8 @@ impl<'a> Iterator for UnreadKeys<'a> { } } +impl FusedIterator for UnreadKeys<'_> {} + impl<'a> IntoIterator for &'a Configuration { type IntoIter = ConfigurationIter<'a>; type Item = (&'a str, &'a str); -- cgit v1.2.3