Add general refactorings (#3996)

This commit is contained in:
Marcin Puc
2021-09-10 00:44:22 +02:00
committed by GitHub
parent ae9f4135c0
commit 51c74eebd0
165 changed files with 540 additions and 615 deletions

View File

@ -28,16 +28,10 @@ impl Default for Selector {
pub fn begin_selector_query(input_html: String, selector: &Selector) -> Vec<Value> {
match selector.attribute.is_empty() {
true => execute_selector_query(
input_html.as_str(),
selector.query.as_str(),
selector.as_html,
),
false => execute_selector_query_with_attribute(
input_html.as_str(),
selector.query.as_str(),
selector.attribute.as_str(),
),
true => execute_selector_query(&input_html, &selector.query, selector.as_html),
false => {
execute_selector_query_with_attribute(&input_html, &selector.query, &selector.attribute)
}
}
}