makes clippy happy
parent
22ebd0780e
commit
8b3cd1ed81
|
@ -72,8 +72,8 @@ pub fn cssifier<S: AsRef<str>>(xpath: S) -> Option<String> {
|
||||||
format!(".{}", mvalue.replace(" ", "."))
|
format!(".{}", mvalue.replace(" ", "."))
|
||||||
} else if mattr == "text()" || mattr == "." {
|
} else if mattr == "text()" || mattr == "." {
|
||||||
format!(":contains(^{}$)", mvalue)
|
format!(":contains(^{}$)", mvalue)
|
||||||
} else if mattr != "" {
|
} else if !mattr.is_empty() {
|
||||||
let new_mvalue = if mvalue.find(" ").is_some() {
|
let new_mvalue = if mvalue.contains(' ') {
|
||||||
format!("\"{}\"", mvalue)
|
format!("\"{}\"", mvalue)
|
||||||
} else {
|
} else {
|
||||||
mvalue.to_string()
|
mvalue.to_string()
|
||||||
|
@ -86,7 +86,7 @@ pub fn cssifier<S: AsRef<str>>(xpath: S) -> Option<String> {
|
||||||
let cattr = node.name("cattr")?.as_str();
|
let cattr = node.name("cattr")?.as_str();
|
||||||
let cvalue = node.name("cvalue")?.as_str();
|
let cvalue = node.name("cvalue")?.as_str();
|
||||||
|
|
||||||
if cattr.starts_with("@") {
|
if cattr.starts_with('@') {
|
||||||
format!("[{}*={}]", cattr.replace("@", ""), cvalue)
|
format!("[{}*={}]", cattr.replace("@", ""), cvalue)
|
||||||
} else if cattr == "text()" {
|
} else if cattr == "text()" {
|
||||||
format!(":contains({})", cvalue)
|
format!(":contains({})", cvalue)
|
||||||
|
|
Loading…
Reference in New Issue