mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:35:44 +02:00
Add general refactorings (#3996)
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user