mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
style: Avoid unused context
argument.
In custom_properties::SpecifiedValue::parse. It's not a big deal now, but it's useful to simplify testing this stuff, since it avoids forcing us to mock it.
This commit is contained in:
parent
3f4afbafab
commit
8ea275a376
3 changed files with 13 additions and 12 deletions
|
@ -908,18 +908,18 @@ impl Parse for ColorStop {
|
|||
}
|
||||
|
||||
impl Parse for PaintWorklet {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
fn parse<'i, 't>(
|
||||
_context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
input.expect_function_matching("paint")?;
|
||||
input.parse_nested_block(|input| {
|
||||
let name = Atom::from(&**input.expect_ident()?);
|
||||
let arguments = input.try(|input| {
|
||||
input.expect_comma()?;
|
||||
input.parse_comma_separated(|input| Ok(*SpecifiedValue::parse(context, input)?))
|
||||
input.parse_comma_separated(|input| Ok(*SpecifiedValue::parse(input)?))
|
||||
}).unwrap_or(vec![]);
|
||||
Ok(PaintWorklet {
|
||||
name: name,
|
||||
arguments: arguments,
|
||||
})
|
||||
Ok(PaintWorklet { name, arguments })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue