clippy: fix warnings on modules outside components (#31567)

This commit is contained in:
eri 2024-03-08 00:42:39 +01:00 committed by GitHub
parent 3b19189896
commit 6c7fe31db1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 37 additions and 46 deletions

View file

@ -35,7 +35,7 @@ fn get_mock_rules(css_selectors: &[&str]) -> (Vec<Vec<Rule>>, SharedRwLock) {
.unwrap();
let locked = Arc::new(shared_lock.wrap(StyleRule {
selectors: selectors,
selectors,
block: Arc::new(shared_lock.wrap(PropertyDeclarationBlock::with_one(
PropertyDeclaration::Display(longhands::display::SpecifiedValue::Block),
Importance::Normal,
@ -75,7 +75,7 @@ fn parse_selectors(selectors: &[&str]) -> Vec<Selector<SelectorImpl>> {
.unwrap()
.0
.into_iter()
.nth(0)
.next()
.unwrap()
})
.collect()
@ -130,7 +130,7 @@ fn test_revalidation_selectors() {
"p:first-child span",
])
.into_iter()
.filter(|s| needs_revalidation_for_testing(&s))
.filter(needs_revalidation_for_testing)
.collect::<Vec<_>>();
let reference = parse_selectors(&[