From 09d3a11c8671efc15c874404a8a2cc77d3113071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 13 Oct 2017 15:07:18 +0200 Subject: [PATCH] style: Reformat a couple signatures. MozReview-Commit-ID: 7Wdvj7i8ClR --- .../style/properties/declaration_block.rs | 32 +++++++++++-------- .../style/properties/properties.mako.rs | 20 ++++++++---- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/components/style/properties/declaration_block.rs b/components/style/properties/declaration_block.rs index 64b33ea86e8..d0518ab5214 100644 --- a/components/style/properties/declaration_block.rs +++ b/components/style/properties/declaration_block.rs @@ -1016,15 +1016,17 @@ pub fn parse_style_attribute(input: &str, /// `PropertyDeclaration`s when expanding a shorthand, for example. /// /// This does not attempt to parse !important at all. -pub fn parse_one_declaration_into(declarations: &mut SourcePropertyDeclaration, - id: PropertyId, - input: &str, - url_data: &UrlExtraData, - error_reporter: &R, - parsing_mode: ParsingMode, - quirks_mode: QuirksMode) - -> Result<(), ()> - where R: ParseErrorReporter +pub fn parse_one_declaration_into( + declarations: &mut SourcePropertyDeclaration, + id: PropertyId, + input: &str, + url_data: &UrlExtraData, + error_reporter: &R, + parsing_mode: ParsingMode, + quirks_mode: QuirksMode +) -> Result<(), ()> +where + R: ParseErrorReporter { let context = ParserContext::new(Origin::Author, 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 /// block. -pub fn parse_property_declaration_list(context: &ParserContext, - error_context: &ParserErrorContext, - input: &mut Parser) - -> PropertyDeclarationBlock - where R: ParseErrorReporter +pub fn parse_property_declaration_list( + context: &ParserContext, + error_context: &ParserErrorContext, + input: &mut Parser, +) -> PropertyDeclarationBlock +where + R: ParseErrorReporter { let mut declarations = SourcePropertyDeclaration::new(); let mut block = PropertyDeclarationBlock::new(); diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 328182ef0ae..b33a91e81df 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -869,9 +869,12 @@ impl ShorthandId { } } - fn parse_into<'i, 't>(&self, declarations: &mut SourcePropertyDeclaration, - context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result<(), ParseError<'i>> { + fn parse_into<'i, 't>( + &self, + declarations: &mut SourcePropertyDeclaration, + context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result<(), ParseError<'i>> { match *self { % for shorthand in data.shorthands_except_all(): ShorthandId::${shorthand.camel_case} => { @@ -1628,10 +1631,13 @@ impl PropertyDeclaration { /// This will not actually parse Importance values, and will always set things /// to Importance::Normal. Parsing Importance values is the job of PropertyDeclarationParser, /// we only set them here so that we don't have to reallocate - pub fn parse_into<'i, 't>(declarations: &mut SourcePropertyDeclaration, - id: PropertyId, name: CowRcStr<'i>, - context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result<(), ParseError<'i>> { + pub fn parse_into<'i, 't>( + declarations: &mut SourcePropertyDeclaration, + id: PropertyId, + name: CowRcStr<'i>, + context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result<(), ParseError<'i>> { assert!(declarations.is_empty()); let start = input.state(); match id {