Remove an extra lifetime parameter on PrivateTreeWalkerHelpers

This commit is contained in:
Cameron Zwarich 2014-10-01 02:07:08 -07:00
parent 72656717d4
commit 0ef191b37a

View file

@ -129,16 +129,16 @@ impl Reflectable for TreeWalker {
} }
} }
type NodeAdvancer<'a, 'b> = |node: JSRef<'a, Node>|: 'b -> Option<Temporary<Node>>; type NodeAdvancer<'a> = |node: JSRef<'a, Node>|: 'a -> Option<Temporary<Node>>;
trait PrivateTreeWalkerHelpers<'a, 'b> { trait PrivateTreeWalkerHelpers<'a> {
fn traverse_children(self, fn traverse_children(self,
next_child: NodeAdvancer<'a, 'b>, next_child: NodeAdvancer<'a>,
next_sibling: NodeAdvancer<'a, 'b>) next_sibling: NodeAdvancer<'a>)
-> Fallible<Option<Temporary<Node>>>; -> Fallible<Option<Temporary<Node>>>;
fn traverse_siblings(self, fn traverse_siblings(self,
next_child: NodeAdvancer<'a, 'b>, next_child: NodeAdvancer<'a>,
next_sibling: NodeAdvancer<'a, 'b>) next_sibling: NodeAdvancer<'a>)
-> Fallible<Option<Temporary<Node>>>; -> Fallible<Option<Temporary<Node>>>;
fn is_root_node(self, node: JSRef<'a, Node>) -> bool; fn is_root_node(self, node: JSRef<'a, Node>) -> bool;
fn is_current_node(self, node: JSRef<'a, Node>) -> bool; fn is_current_node(self, node: JSRef<'a, Node>) -> bool;
@ -147,11 +147,11 @@ trait PrivateTreeWalkerHelpers<'a, 'b> {
fn accept_node(self, node: JSRef<'a, Node>) -> Fallible<u16>; fn accept_node(self, node: JSRef<'a, Node>) -> Fallible<u16>;
} }
impl<'a, 'b> PrivateTreeWalkerHelpers<'a, 'b> for JSRef<'a, TreeWalker> { impl<'a> PrivateTreeWalkerHelpers<'a> for JSRef<'a, TreeWalker> {
// http://dom.spec.whatwg.org/#concept-traverse-children // http://dom.spec.whatwg.org/#concept-traverse-children
fn traverse_children(self, fn traverse_children(self,
next_child: NodeAdvancer<'a, 'b>, next_child: NodeAdvancer<'a>,
next_sibling: NodeAdvancer<'a, 'b>) next_sibling: NodeAdvancer<'a>)
-> Fallible<Option<Temporary<Node>>> { -> Fallible<Option<Temporary<Node>>> {
// "To **traverse children** of type *type*, run these steps:" // "To **traverse children** of type *type*, run these steps:"
// "1. Let node be the value of the currentNode attribute." // "1. Let node be the value of the currentNode attribute."
@ -229,8 +229,8 @@ impl<'a, 'b> PrivateTreeWalkerHelpers<'a, 'b> for JSRef<'a, TreeWalker> {
// http://dom.spec.whatwg.org/#concept-traverse-siblings // http://dom.spec.whatwg.org/#concept-traverse-siblings
fn traverse_siblings(self, fn traverse_siblings(self,
next_child: NodeAdvancer<'a, 'b>, next_child: NodeAdvancer<'a>,
next_sibling: NodeAdvancer<'a, 'b>) next_sibling: NodeAdvancer<'a>)
-> Fallible<Option<Temporary<Node>>> { -> Fallible<Option<Temporary<Node>>> {
// "To **traverse siblings** of type *type* run these steps:" // "To **traverse siblings** of type *type* run these steps:"
// "1. Let node be the value of the currentNode attribute." // "1. Let node be the value of the currentNode attribute."