From ee29d3503b9c0bec16b330dad01e6623f6cecbd1 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sun, 28 Aug 2016 21:37:47 +0200 Subject: [PATCH] Upgrade to rustc 1.13.0-nightly (a23064af5 2016-08-27) --- Cargo.toml | 2 +- src/rules_and_declarations.rs | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e1be5d7d..a1ea99cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cssparser" -version = "0.5.8" +version = "0.6.0" authors = [ "Simon Sapin " ] description = "Rust implementation of CSS Syntax Level 3" diff --git a/src/rules_and_declarations.rs b/src/rules_and_declarations.rs index 5dda1b20..5b72ec3f 100644 --- a/src/rules_and_declarations.rs +++ b/src/rules_and_declarations.rs @@ -186,8 +186,7 @@ pub trait QualifiedRuleParser { /// Provides an iterator for declaration list parsing. -pub struct DeclarationListParser<'i: 't, 't: 'a, 'a, I, P> -where P: DeclarationParser + AtRuleParser { +pub struct DeclarationListParser<'i: 't, 't: 'a, 'a, P> { /// The input given to `DeclarationListParser::new` pub input: &'a mut Parser<'i, 't>, @@ -196,7 +195,7 @@ where P: DeclarationParser + AtRuleParser { } -impl<'i, 't, 'a, I, P> DeclarationListParser<'i, 't, 'a, I, P> +impl<'i, 't, 'a, I, P> DeclarationListParser<'i, 't, 'a, P> where P: DeclarationParser + AtRuleParser { /// Create a new `DeclarationListParser` for the given `input` and `parser`. /// @@ -212,8 +211,7 @@ where P: DeclarationParser + AtRuleParser { /// The return type for finished declarations and at-rules also needs to be the same, /// since `::next` can return either. /// It could be a custom enum. - pub fn new(input: &'a mut Parser<'i, 't>, parser: P) - -> DeclarationListParser<'i, 't, 'a, I, P> { + pub fn new(input: &'a mut Parser<'i, 't>, parser: P) -> Self { DeclarationListParser { input: input, parser: parser, @@ -223,7 +221,7 @@ where P: DeclarationParser + AtRuleParser { /// `DeclarationListParser` is an iterator that yields `Ok(_)` for a valid declaration or at-rule /// or `Err(())` for an invalid one. -impl<'i, 't, 'a, I, P> Iterator for DeclarationListParser<'i, 't, 'a, I, P> +impl<'i, 't, 'a, I, P> Iterator for DeclarationListParser<'i, 't, 'a, P> where P: DeclarationParser + AtRuleParser { type Item = Result>; @@ -256,8 +254,7 @@ where P: DeclarationParser + AtRuleParser { /// Provides an iterator for rule list parsing. -pub struct RuleListParser<'i: 't, 't: 'a, 'a, R, P> -where P: QualifiedRuleParser + AtRuleParser { +pub struct RuleListParser<'i: 't, 't: 'a, 'a, P> { /// The input given to `RuleListParser::new` pub input: &'a mut Parser<'i, 't>, @@ -269,7 +266,7 @@ where P: QualifiedRuleParser + AtRuleParser { } -impl<'i: 't, 't: 'a, 'a, R, P> RuleListParser<'i, 't, 'a, R, P> +impl<'i: 't, 't: 'a, 'a, R, P> RuleListParser<'i, 't, 'a, P> where P: QualifiedRuleParser + AtRuleParser { /// Create a new `RuleListParser` for the given `input` at the top-level of a stylesheet /// and the given `parser`. @@ -281,8 +278,7 @@ where P: QualifiedRuleParser + AtRuleParser { /// The return type for finished qualified rules and at-rules also needs to be the same, /// since `::next` can return either. /// It could be a custom enum. - pub fn new_for_stylesheet(input: &'a mut Parser<'i, 't>, parser: P) - -> RuleListParser<'i, 't, 'a, R, P> { + pub fn new_for_stylesheet(input: &'a mut Parser<'i, 't>, parser: P) -> Self { RuleListParser { input: input, parser: parser, @@ -297,8 +293,7 @@ where P: QualifiedRuleParser + AtRuleParser { /// This differs in that `` tokens /// should only be ignored at the stylesheet top-level. /// (This is to deal with legacy work arounds for `