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