pub trait DeduplicatedSelectorsExt
{
#[inline(always)]
fn remove_unmatched_selectors<HtmlDocumentOrNode: Selectable>(&mut self, html_document_and_nodes: &[&HtmlDocumentOrNode]);
}
impl DeduplicatedSelectorsExt for DeduplicatedSelectors
{
#[inline(always)]
fn remove_unmatched_selectors<HtmlDocumentOrNode: Selectable>(&mut self, html_document_and_nodes: &[&HtmlDocumentOrNode])
{
#[inline(always)]
fn retain<HtmlDocumentOrNode: Selectable>(selector: &OurSelector, html_document_and_nodes: &[&HtmlDocumentOrNode]) -> bool
{
const HAS_MATCHES_SO_RETAIN: bool = true;
for selectable in html_document_and_nodes.iter()
{
let has_matches = selectable.find_all_matching_child_nodes_depth_first_including_this_one(selector, &mut |_| HAS_MATCHES_SO_RETAIN);
if has_matches
{
return HAS_MATCHES_SO_RETAIN;
}
}
false
}
self.0.retain(|selector| retain(selector, html_document_and_nodes));
}
}