From a0a6276f117cfb11ee271e5956c032535885632c Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 12 Jul 2024 12:13:56 +0900 Subject: [PATCH] Remove dead code This has recently (?) started causing Rust build warnings. --- src/dom_utils.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/dom_utils.rs b/src/dom_utils.rs index 34b07ae..a7ca9cd 100644 --- a/src/dom_utils.rs +++ b/src/dom_utils.rs @@ -20,11 +20,6 @@ pub trait NodeHandleExt { self.get_attribute(name).is_some() } - /// Returns true if the attribute exists and the predicate matches it. - fn attribute_matches(&self, name: &QualName, f: impl Fn(&str) -> bool) -> bool { - self.get_attribute(name).map_or(false, |v| f(&v)) - } - /// Returns true if the attribute exists and has the value mentioned. fn attribute_is(&self, name: &QualName, expected: &str) -> bool { self.get_attribute(name).as_deref() == Some(expected) @@ -64,25 +59,9 @@ pub trait NodeHandleExt { /// Appends children (without checking node type). fn append_children(&self, children: impl Iterator); - /// Same, but just one. - fn append_child(&self, child: Self) - where - Self: Sized, - { - self.append_children(std::iter::once(child)) - } - /// Inserts children before the specified child. fn insert_children_before(&self, existing: &Self, new: impl Iterator); - /// Same, but just one. - fn insert_child(&self, existing: &Self, new: Self) - where - Self: Sized, - { - self.insert_children_before(existing, std::iter::once(new)) - } - /// Removes the node from its parent and replaces it with the nodes provided. /// Does nothing if the node has no parent. fn replace_with(&self, replacements: Vec)