@@ -1,6 +1,7 @@
1use crate::{RootRender, VdomWeak};
1use crate::{RootRender, VdomWeak};
2use bumpalo::Bump;
2use bumpalo::Bump;
3use std::fmt;
3use std::fmt;
4use std::mem;
5use std::mem;
6/// A node is either a text node or an element.
7/// A node is either a text node or an element.
@@ -149,6 +150,15 @@ impl<'a> Node<'a> {
153+impl<'a> IntoIterator for Node<'a> {
154+ type Item = Node<'a>;
155+ type IntoIter = iter::Once<Self::Item>;
157+ fn into_iter(self) -> Self::IntoIter {
152impl<'a> TextNode<'a> {
162impl<'a> TextNode<'a> {
153 /// Get this text node's text content.
163 /// Get this text node's text content.
154 pub fn text(&self) -> &'a str {
164 pub fn text(&self) -> &'a str {