Fix a bunch of future clippy warnings (#3586)

* Fix a bunch of future clippy warnings

* Fix a bunch of future clippy warnings
This commit is contained in:
JT
2021-06-10 07:08:12 +12:00
committed by GitHub
parent e8a2250ef8
commit 383e874166
86 changed files with 237 additions and 258 deletions

View File

@ -46,7 +46,7 @@ impl Plugin for Selector {
Value {
value: UntaggedValue::Primitive(Primitive::String(s)),
..
} => Ok(begin_selector_query(s, &self)
} => Ok(begin_selector_query(s, self)
.into_iter()
.map(ReturnSuccess::value)
.collect()),

View File

@ -48,7 +48,7 @@ fn execute_selector_query_with_attribute(
) -> Vec<Value> {
let doc = Document::from(input_string);
doc.select(&query_string)
doc.select(query_string)
.iter()
.map(|selection| {
selection
@ -64,12 +64,12 @@ fn execute_selector_query(input_string: &str, query_string: &str, as_html: bool)
match as_html {
true => doc
.select(&query_string)
.select(query_string)
.iter()
.map(|selection| selection.html().to_string().to_string_value_create_tag())
.collect(),
false => doc
.select(&query_string)
.select(query_string)
.iter()
.map(|selection| selection.text().to_string().to_string_value_create_tag())
.collect(),