summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-10 13:01:30 -0400
committerpommicket <pommicket@gmail.com>2025-09-10 13:01:30 -0400
commit8072b86d763f09f624a475972f9538a47aeee88a (patch)
tree0570e2cf9d7511a4a242126c91c5a9f7de82314a
parent5deb7ed79fd2d2bf7e271c35b30f21abaa653fed (diff)
impl FusedIterator on all our iterators
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
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);