diff options
author | pommicket <pommicket@gmail.com> | 2025-09-10 13:01:30 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-10 13:01:30 -0400 |
commit | 8072b86d763f09f624a475972f9538a47aeee88a (patch) | |
tree | 0570e2cf9d7511a4a242126c91c5a9f7de82314a /src | |
parent | 5deb7ed79fd2d2bf7e271c35b30f21abaa653fed (diff) |
impl FusedIterator on all our iterators
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |