style: Reformat a couple signatures.

MozReview-Commit-ID: 7Wdvj7i8ClR
This commit is contained in:
Emilio Cobos Álvarez 2017-10-13 15:07:18 +02:00
parent a89a76e1fc
commit 09d3a11c86
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 31 additions and 21 deletions

View file

@ -1016,15 +1016,17 @@ pub fn parse_style_attribute<R>(input: &str,
/// `PropertyDeclaration`s when expanding a shorthand, for example. /// `PropertyDeclaration`s when expanding a shorthand, for example.
/// ///
/// This does not attempt to parse !important at all. /// This does not attempt to parse !important at all.
pub fn parse_one_declaration_into<R>(declarations: &mut SourcePropertyDeclaration, pub fn parse_one_declaration_into<R>(
id: PropertyId, declarations: &mut SourcePropertyDeclaration,
input: &str, id: PropertyId,
url_data: &UrlExtraData, input: &str,
error_reporter: &R, url_data: &UrlExtraData,
parsing_mode: ParsingMode, error_reporter: &R,
quirks_mode: QuirksMode) parsing_mode: ParsingMode,
-> Result<(), ()> quirks_mode: QuirksMode
where R: ParseErrorReporter ) -> Result<(), ()>
where
R: ParseErrorReporter
{ {
let context = ParserContext::new(Origin::Author, let context = ParserContext::new(Origin::Author,
url_data, url_data,
@ -1102,11 +1104,13 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b> {
/// Parse a list of property declarations and return a property declaration /// Parse a list of property declarations and return a property declaration
/// block. /// block.
pub fn parse_property_declaration_list<R>(context: &ParserContext, pub fn parse_property_declaration_list<R>(
error_context: &ParserErrorContext<R>, context: &ParserContext,
input: &mut Parser) error_context: &ParserErrorContext<R>,
-> PropertyDeclarationBlock input: &mut Parser,
where R: ParseErrorReporter ) -> PropertyDeclarationBlock
where
R: ParseErrorReporter
{ {
let mut declarations = SourcePropertyDeclaration::new(); let mut declarations = SourcePropertyDeclaration::new();
let mut block = PropertyDeclarationBlock::new(); let mut block = PropertyDeclarationBlock::new();

View file

@ -869,9 +869,12 @@ impl ShorthandId {
} }
} }
fn parse_into<'i, 't>(&self, declarations: &mut SourcePropertyDeclaration, fn parse_into<'i, 't>(
context: &ParserContext, input: &mut Parser<'i, 't>) &self,
-> Result<(), ParseError<'i>> { declarations: &mut SourcePropertyDeclaration,
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<(), ParseError<'i>> {
match *self { match *self {
% for shorthand in data.shorthands_except_all(): % for shorthand in data.shorthands_except_all():
ShorthandId::${shorthand.camel_case} => { ShorthandId::${shorthand.camel_case} => {
@ -1628,10 +1631,13 @@ impl PropertyDeclaration {
/// This will not actually parse Importance values, and will always set things /// This will not actually parse Importance values, and will always set things
/// to Importance::Normal. Parsing Importance values is the job of PropertyDeclarationParser, /// to Importance::Normal. Parsing Importance values is the job of PropertyDeclarationParser,
/// we only set them here so that we don't have to reallocate /// we only set them here so that we don't have to reallocate
pub fn parse_into<'i, 't>(declarations: &mut SourcePropertyDeclaration, pub fn parse_into<'i, 't>(
id: PropertyId, name: CowRcStr<'i>, declarations: &mut SourcePropertyDeclaration,
context: &ParserContext, input: &mut Parser<'i, 't>) id: PropertyId,
-> Result<(), ParseError<'i>> { name: CowRcStr<'i>,
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<(), ParseError<'i>> {
assert!(declarations.is_empty()); assert!(declarations.is_empty());
let start = input.state(); let start = input.state();
match id { match id {