style: Fix clippy warnings

Depends on D96634

Differential Revision: https://phabricator.services.mozilla.com/D96636
This commit is contained in:
Sylvestre Ledru 2020-11-17 12:02:22 +00:00 committed by Emilio Cobos Álvarez
parent 191d5226a3
commit a95ce79554
6 changed files with 13 additions and 16 deletions

View file

@ -493,10 +493,8 @@ where
// :where and :is OR their selectors, so we can't put any hash
// in the filter if there's more than one selector, as that'd
// exclude elements that may match one of the other selectors.
if list.len() == 1 {
if !collect_ancestor_hashes(list[0].iter(), quirks_mode, hashes, len) {
return false;
}
if list.len() == 1 && !collect_ancestor_hashes(list[0].iter(), quirks_mode, hashes, len) {
return false;
}
continue;
},
@ -2777,8 +2775,8 @@ pub mod tests {
assert!(list.is_ok());
}
const MATHML: &'static str = "http://www.w3.org/1998/Math/MathML";
const SVG: &'static str = "http://www.w3.org/2000/svg";
const MATHML: &str = "http://www.w3.org/1998/Math/MathML";
const SVG: &str = "http://www.w3.org/2000/svg";
#[test]
fn test_parsing() {