@@ -20,11 +20,6 @@ pub trait NodeHandleExt {
20
20
self . get_attribute ( name) . is_some ( )
21
21
}
22
22
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
-
28
23
/// Returns true if the attribute exists and has the value mentioned.
29
24
fn attribute_is ( & self , name : & QualName , expected : & str ) -> bool {
30
25
self . get_attribute ( name) . as_deref ( ) == Some ( expected)
@@ -64,25 +59,9 @@ pub trait NodeHandleExt {
64
59
/// Appends children (without checking node type).
65
60
fn append_children ( & self , children : impl Iterator < Item = Self > ) ;
66
61
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
-
75
62
/// Inserts children before the specified child.
76
63
fn insert_children_before ( & self , existing : & Self , new : impl Iterator < Item = Self > ) ;
77
64
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
-
86
65
/// Removes the node from its parent and replaces it with the nodes provided.
87
66
/// Does nothing if the node has no parent.
88
67
fn replace_with ( & self , replacements : Vec < Self > )
0 commit comments