Move is_root() into AbstractNode

This commit is contained in:
Keegan McAllister 2013-07-23 13:51:53 -07:00
parent ae79f5351d
commit a9a5e90787
2 changed files with 6 additions and 7 deletions

View file

@ -264,6 +264,11 @@ impl<'self, View> AbstractNode<View> {
self.with_base(|b| b.next_sibling)
}
/// Is this node a root?
pub fn is_root(self) -> bool {
self.parent_node().is_none()
}
//
// Downcasting borrows
//