@@ -150,6 +150,13 @@ impl<'a> Node<'a> {
153+/// A node can become an iterator that yields the node itself once.
155+/// This implementation of `IntoIterator` mostly exists to improve the
156+/// `typed-html` ergonomics, where the macro invokes `.into_iter()` on the child
157+/// contents of a tag. By implementing `IntoIterator` here, we avoid having to
158+/// do nasty shenanigans like `<p>vec![$contents]</p>` instead of plain old
159+/// `<p>$contents</p>`.
153impl<'a> IntoIterator for Node<'a> {
160impl<'a> IntoIterator for Node<'a> {
154 type Item = Node<'a>;
161 type Item = Node<'a>;
155 type IntoIter = iter::Once<Self::Item>;
162 type IntoIter = iter::Once<Self::Item>;