@@ -1,6 +1,7 @@
11use crate::{RootRender, VdomWeak};
22use bumpalo::Bump;
33use std::fmt;
4+use std::iter;
45use std::mem;
56
67/// A node is either a text node or an element.
@@ -149,6 +150,15 @@ impl<'a> Node<'a> {
149150 }
150151}
151152
153+impl<'a> IntoIterator for Node<'a> {
154+ type Item = Node<'a>;
155+ type IntoIter = iter::Once<Self::Item>;
156+
157+ fn into_iter(self) -> Self::IntoIter {
158+ iter::once(self)
159+ }
160+}
161+
152162impl<'a> TextNode<'a> {
153163 /// Get this text node's text content.
154164 pub fn text(&self) -> &'a str {