diff --git a/src/element_ref/mod.rs b/src/element_ref/mod.rs index 0485fca6..da3f0620 100644 --- a/src/element_ref/mod.rs +++ b/src/element_ref/mod.rs @@ -1,5 +1,6 @@ //! Element references. +use std::iter::FusedIterator; use std::ops::Deref; use ego_tree::iter::{Edge, Traverse}; @@ -115,6 +116,8 @@ impl<'a, 'b> Iterator for Select<'a, 'b> { } } +impl FusedIterator for Select<'_, '_> {} + /// Iterator over descendent text nodes. #[derive(Debug, Clone)] pub struct Text<'a> { diff --git a/src/html/mod.rs b/src/html/mod.rs index 26ec5ea0..ad7b93f0 100644 --- a/src/html/mod.rs +++ b/src/html/mod.rs @@ -2,6 +2,7 @@ #[cfg(feature = "errors")] use std::borrow::Cow; +use std::iter::FusedIterator; use ego_tree::iter::Nodes; use ego_tree::Tree; @@ -161,6 +162,8 @@ impl<'a, 'b> DoubleEndedIterator for Select<'a, 'b> { } } +impl FusedIterator for Select<'_, '_> {} + mod serializable; mod tree_sink;