@@ -140,14 +140,14 @@ pub trait AtRuleParser<'i> {
140
140
141
141
/// A trait to provide various parsing of qualified rules.
142
142
///
143
- /// For example, there could be different implementations
144
- /// for top-level qualified rules (i.e. style rules with Selectors as prelude)
145
- /// and for qualified rules inside `@keyframes` (keyframe rules with keyframe selectors as prelude).
143
+ /// For example, there could be different implementations for top-level qualified rules (i.e. style
144
+ /// rules with Selectors as prelude) and for qualified rules inside `@keyframes` (keyframe rules
145
+ /// with keyframe selectors as prelude).
146
146
///
147
- /// Default implementations that reject all qualified rules are provided,
148
- /// so that `impl QualifiedRuleParser<(), ()> for ... {}` can be used
149
- /// for example for using `RuleListParser` to parse a rule list with only at-rules
150
- /// (such as inside `@font-feature-values`).
147
+ /// Default implementations that reject all qualified rules are provided, so that
148
+ /// `impl QualifiedRuleParser<(), ()> for ... {}` can be used for example for using
149
+ /// `RuleListParser` to parse a rule list with only at-rules (such as inside
150
+ /// `@font-feature-values`).
151
151
pub trait QualifiedRuleParser < ' i > {
152
152
/// The intermediate representation of a qualified rule prelude.
153
153
type Prelude ;
@@ -223,10 +223,7 @@ where
223
223
/// since `<DeclarationListParser as Iterator>::next` can return either.
224
224
/// It could be a custom enum.
225
225
pub fn new ( input : & ' a mut Parser < ' i , ' t > , parser : P ) -> Self {
226
- DeclarationListParser {
227
- input : input,
228
- parser : parser,
229
- }
226
+ DeclarationListParser { input, parser }
230
227
}
231
228
}
232
229
@@ -304,8 +301,8 @@ where
304
301
/// It could be a custom enum.
305
302
pub fn new_for_stylesheet ( input : & ' a mut Parser < ' i , ' t > , parser : P ) -> Self {
306
303
RuleListParser {
307
- input : input ,
308
- parser : parser ,
304
+ input,
305
+ parser,
309
306
is_stylesheet : true ,
310
307
any_rule_so_far : false ,
311
308
}
@@ -319,8 +316,8 @@ where
319
316
/// (This is to deal with legacy workarounds for `<style>` HTML element parsing.)
320
317
pub fn new_for_nested_rule ( input : & ' a mut Parser < ' i , ' t > , parser : P ) -> Self {
321
318
RuleListParser {
322
- input : input ,
323
- parser : parser ,
319
+ input,
320
+ parser,
324
321
is_stylesheet : false ,
325
322
any_rule_so_far : false ,
326
323
}
0 commit comments