Auto merge of #18864 - emilio:reformat, r=jdm

style: Reformat a few signatures to follow a consistent style.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18864)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-13 14:11:02 -05:00 committed by GitHub
commit db29af160c
4 changed files with 253 additions and 200 deletions

View file

@ -2926,10 +2926,6 @@ extern "C" {
set: RawServoStyleSetBorrowed)
-> ServoStyleContextStrong;
}
extern "C" {
pub fn Servo_ResolveStyleAllowStale(element: RawGeckoElementBorrowed)
-> ServoStyleContextStrong;
}
extern "C" {
pub fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed,
pseudo_type: CSSPseudoElementType,

View file

@ -1016,15 +1016,17 @@ pub fn parse_style_attribute<R>(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<R>(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<R>(
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<R>(context: &ParserContext,
error_context: &ParserErrorContext<R>,
input: &mut Parser)
-> PropertyDeclarationBlock
where R: ParseErrorReporter
pub fn parse_property_declaration_list<R>(
context: &ParserContext,
error_context: &ParserErrorContext<R>,
input: &mut Parser,
) -> PropertyDeclarationBlock
where
R: ParseErrorReporter
{
let mut declarations = SourcePropertyDeclaration::new();
let mut block = PropertyDeclarationBlock::new();

View file

@ -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 {