Skip to content

Commit b53ca32

Browse files
author
bors-servo
authored
Auto merge of #108 - servo:rustup, r=nox
Upgrade to rustc 1.13.0-nightly (a23064af5 2016-08-27) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/108) <!-- Reviewable:end -->
2 parents 59835bc + ee29d35 commit b53ca32

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "cssparser"
4-
version = "0.5.8"
4+
version = "0.6.0"
55
authors = [ "Simon Sapin <simon.sapin@exyr.org>" ]
66

77
description = "Rust implementation of CSS Syntax Level 3"

src/rules_and_declarations.rs

+9-14
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ pub trait QualifiedRuleParser {
186186

187187

188188
/// Provides an iterator for declaration list parsing.
189-
pub struct DeclarationListParser<'i: 't, 't: 'a, 'a, I, P>
190-
where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
189+
pub struct DeclarationListParser<'i: 't, 't: 'a, 'a, P> {
191190
/// The input given to `DeclarationListParser::new`
192191
pub input: &'a mut Parser<'i, 't>,
193192

@@ -196,7 +195,7 @@ where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
196195
}
197196

198197

199-
impl<'i, 't, 'a, I, P> DeclarationListParser<'i, 't, 'a, I, P>
198+
impl<'i, 't, 'a, I, P> DeclarationListParser<'i, 't, 'a, P>
200199
where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
201200
/// Create a new `DeclarationListParser` for the given `input` and `parser`.
202201
///
@@ -212,8 +211,7 @@ where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
212211
/// The return type for finished declarations and at-rules also needs to be the same,
213212
/// since `<DeclarationListParser as Iterator>::next` can return either.
214213
/// It could be a custom enum.
215-
pub fn new(input: &'a mut Parser<'i, 't>, parser: P)
216-
-> DeclarationListParser<'i, 't, 'a, I, P> {
214+
pub fn new(input: &'a mut Parser<'i, 't>, parser: P) -> Self {
217215
DeclarationListParser {
218216
input: input,
219217
parser: parser,
@@ -223,7 +221,7 @@ where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
223221

224222
/// `DeclarationListParser` is an iterator that yields `Ok(_)` for a valid declaration or at-rule
225223
/// or `Err(())` for an invalid one.
226-
impl<'i, 't, 'a, I, P> Iterator for DeclarationListParser<'i, 't, 'a, I, P>
224+
impl<'i, 't, 'a, I, P> Iterator for DeclarationListParser<'i, 't, 'a, P>
227225
where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
228226
type Item = Result<I, Range<SourcePosition>>;
229227

@@ -256,8 +254,7 @@ where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
256254

257255

258256
/// Provides an iterator for rule list parsing.
259-
pub struct RuleListParser<'i: 't, 't: 'a, 'a, R, P>
260-
where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
257+
pub struct RuleListParser<'i: 't, 't: 'a, 'a, P> {
261258
/// The input given to `RuleListParser::new`
262259
pub input: &'a mut Parser<'i, 't>,
263260

@@ -269,7 +266,7 @@ where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
269266
}
270267

271268

272-
impl<'i: 't, 't: 'a, 'a, R, P> RuleListParser<'i, 't, 'a, R, P>
269+
impl<'i: 't, 't: 'a, 'a, R, P> RuleListParser<'i, 't, 'a, P>
273270
where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
274271
/// Create a new `RuleListParser` for the given `input` at the top-level of a stylesheet
275272
/// and the given `parser`.
@@ -281,8 +278,7 @@ where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
281278
/// The return type for finished qualified rules and at-rules also needs to be the same,
282279
/// since `<RuleListParser as Iterator>::next` can return either.
283280
/// It could be a custom enum.
284-
pub fn new_for_stylesheet(input: &'a mut Parser<'i, 't>, parser: P)
285-
-> RuleListParser<'i, 't, 'a, R, P> {
281+
pub fn new_for_stylesheet(input: &'a mut Parser<'i, 't>, parser: P) -> Self {
286282
RuleListParser {
287283
input: input,
288284
parser: parser,
@@ -297,8 +293,7 @@ where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
297293
/// This differs in that `<!--` and `-->` tokens
298294
/// should only be ignored at the stylesheet top-level.
299295
/// (This is to deal with legacy work arounds for `<style>` HTML element parsing.)
300-
pub fn new_for_nested_rule(input: &'a mut Parser<'i, 't>, parser: P)
301-
-> RuleListParser<'i, 't, 'a, R, P> {
296+
pub fn new_for_nested_rule(input: &'a mut Parser<'i, 't>, parser: P) -> Self {
302297
RuleListParser {
303298
input: input,
304299
parser: parser,
@@ -311,7 +306,7 @@ where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
311306

312307

313308
/// `RuleListParser` is an iterator that yields `Ok(_)` for a rule or `Err(())` for an invalid one.
314-
impl<'i, 't, 'a, R, P> Iterator for RuleListParser<'i, 't, 'a, R, P>
309+
impl<'i, 't, 'a, R, P> Iterator for RuleListParser<'i, 't, 'a, P>
315310
where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
316311
type Item = Result<R, Range<SourcePosition>>;
317312

0 commit comments

Comments
 (0)