mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
clippy: fix warnings on modules outside components (#31567)
This commit is contained in:
parent
3b19189896
commit
6c7fe31db1
9 changed files with 37 additions and 46 deletions
|
@ -9,8 +9,8 @@ use style::stylesheets::{Namespaces, Origin};
|
|||
use style_traits::ParseError;
|
||||
use url::Url;
|
||||
|
||||
fn parse_selector<'i, 't>(
|
||||
input: &mut Parser<'i, 't>,
|
||||
fn parse_selector<'i>(
|
||||
input: &mut Parser<'i, '_>,
|
||||
) -> Result<SelectorList<SelectorImpl>, ParseError<'i>> {
|
||||
let mut ns = Namespaces::default();
|
||||
ns.prefixes
|
||||
|
|
|
@ -17,7 +17,7 @@ pub fn split_html_space_chars_whitespace() {
|
|||
#[test]
|
||||
pub fn test_str_join_empty() {
|
||||
let slice: [&str; 0] = [];
|
||||
let actual = str_join(&slice, "-");
|
||||
let actual = str_join(slice, "-");
|
||||
let expected = "";
|
||||
assert_eq!(actual, expected);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ pub fn test_str_join_empty() {
|
|||
#[test]
|
||||
pub fn test_str_join_one() {
|
||||
let slice = ["alpha"];
|
||||
let actual = str_join(&slice, "-");
|
||||
let actual = str_join(slice, "-");
|
||||
let expected = "alpha";
|
||||
assert_eq!(actual, expected);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ pub fn test_str_join_one() {
|
|||
#[test]
|
||||
pub fn test_str_join_many() {
|
||||
let slice = ["", "alpha", "", "beta", "gamma", ""];
|
||||
let actual = str_join(&slice, "-");
|
||||
let actual = str_join(slice, "-");
|
||||
let expected = "-alpha--beta-gamma-";
|
||||
assert_eq!(actual, expected);
|
||||
}
|
||||
|
|
|
@ -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(&[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue