Skip to content

Commit 1d97e73

Browse files
jdmlarsbergstrom
authored andcommitted
Warning police.
1 parent 1ae0338 commit 1d97e73

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub struct AtRule {
9595
pub enum DeclarationListItem {
9696
Declaration(Declaration),
9797
// A better idea for a name that means "at-rule" but is not "AtRule"?
98-
Decl_AtRule(AtRule),
98+
DeclAtRule(AtRule),
9999
}
100100

101101
#[deriving(Eq)]

nth.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn parse_nth(input: &[ComponentValue]) -> Option<(i32, i32)> {
2323
match unit {
2424
"n" => parse_b(iter, a as i32),
2525
"n-" => parse_signless_b(iter, a as i32, -1),
26-
_ => match(parse_n_dash_digits(unit)) {
26+
_ => match parse_n_dash_digits(unit) {
2727
Some(b) => parse_end(iter, a as i32, b),
2828
_ => None
2929
},
@@ -40,11 +40,11 @@ pub fn parse_nth(input: &[ComponentValue]) -> Option<(i32, i32)> {
4040
"-n" => parse_b(iter, -1),
4141
"n-" => parse_signless_b(iter, 1, -1),
4242
"-n-" => parse_signless_b(iter, -1, -1),
43-
_ if ident.starts_with("-") => match(parse_n_dash_digits(ident.slice_from(1))) {
43+
_ if ident.starts_with("-") => match parse_n_dash_digits(ident.slice_from(1)) {
4444
Some(b) => parse_end(iter, -1, b),
4545
_ => None
4646
},
47-
_ => match(parse_n_dash_digits(ident)) {
47+
_ => match parse_n_dash_digits(ident) {
4848
Some(b) => parse_end(iter, 1, b),
4949
_ => None
5050
},
@@ -56,7 +56,7 @@ pub fn parse_nth(input: &[ComponentValue]) -> Option<(i32, i32)> {
5656
match ident {
5757
"n" => parse_b(iter, 1),
5858
"n-" => parse_signless_b(iter, 1, -1),
59-
_ => match(parse_n_dash_digits(ident)) {
59+
_ => match parse_n_dash_digits(ident) {
6060
Some(b) => parse_end(iter, 1, b),
6161
_ => None
6262
},

parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ for DeclarationListParser<T> {
160160
match component_value {
161161
WhiteSpace | Semicolon => (),
162162
AtKeyword(name)
163-
=> return Some(Ok(Decl_AtRule(parse_at_rule(iter, name, location)))),
163+
=> return Some(Ok(DeclAtRule(parse_at_rule(iter, name, location)))),
164164
_ => return Some(match parse_declaration(iter, component_value, location) {
165165
Ok(declaration) => Ok(Declaration(declaration)),
166166
Err(e) => {

tokenizer.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,8 @@ fn next_component_value(tokenizer: &mut Tokenizer) -> Option<Node> {
185185
}
186186
},
187187
'.' => {
188-
if (
189-
tokenizer.position + 1 < tokenizer.length
190-
&& is_match!(tokenizer.char_at(1), '0'..'9')
188+
if tokenizer.position + 1 < tokenizer.length
189+
&& is_match!(tokenizer.char_at(1), '0'..'9'
191190
) {
192191
consume_numeric(tokenizer)
193192
} else {

0 commit comments

Comments
 (0)