@@ -20,11 +20,6 @@ pub trait NodeHandleExt {
2020 self . get_attribute ( name) . is_some ( )
2121 }
2222
23- /// Returns true if the attribute exists and the predicate matches it.
24- fn attribute_matches ( & self , name : & QualName , f : impl Fn ( & str ) -> bool ) -> bool {
25- self . get_attribute ( name) . map_or ( false , |v| f ( & v) )
26- }
27-
2823 /// Returns true if the attribute exists and has the value mentioned.
2924 fn attribute_is ( & self , name : & QualName , expected : & str ) -> bool {
3025 self . get_attribute ( name) . as_deref ( ) == Some ( expected)
@@ -64,25 +59,9 @@ pub trait NodeHandleExt {
6459 /// Appends children (without checking node type).
6560 fn append_children ( & self , children : impl Iterator < Item = Self > ) ;
6661
67- /// Same, but just one.
68- fn append_child ( & self , child : Self )
69- where
70- Self : Sized ,
71- {
72- self . append_children ( std:: iter:: once ( child) )
73- }
74-
7562 /// Inserts children before the specified child.
7663 fn insert_children_before ( & self , existing : & Self , new : impl Iterator < Item = Self > ) ;
7764
78- /// Same, but just one.
79- fn insert_child ( & self , existing : & Self , new : Self )
80- where
81- Self : Sized ,
82- {
83- self . insert_children_before ( existing, std:: iter:: once ( new) )
84- }
85-
8665 /// Removes the node from its parent and replaces it with the nodes provided.
8766 /// Does nothing if the node has no parent.
8867 fn replace_with ( & self , replacements : Vec < Self > )
0 commit comments