File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ impl<'a> SkipWhitespaceIterable<'a> for &'a [ComponentValue] {
152
152
153
153
#[ deriving( Clone ) ]
154
154
pub struct SkipWhitespaceIterator < ' a > {
155
- pub iter_with_whitespace : slice:: Items < ' a , ComponentValue > ,
155
+ pub iter_with_whitespace : slice:: Iter < ' a , ComponentValue > ,
156
156
}
157
157
158
158
impl < ' a > Iterator < & ' a ComponentValue > for SkipWhitespaceIterator < ' a > {
@@ -176,7 +176,7 @@ impl MoveSkipWhitespaceIterable for Vec<ComponentValue> {
176
176
}
177
177
178
178
pub struct MoveSkipWhitespaceIterator {
179
- iter_with_whitespace : vec:: MoveItems < ComponentValue > ,
179
+ iter_with_whitespace : vec:: IntoIter < ComponentValue > ,
180
180
}
181
181
182
182
impl Iterator < ComponentValue > for MoveSkipWhitespaceIterator {
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ fn parse_n_dash_digits(string: &str) -> Option<i32> {
111
111
&& string. starts_with ( "n-" )
112
112
&& string. slice_from ( 2 ) . chars ( ) . all ( |c| match c { '0' ...'9' => true , _ => false } )
113
113
{
114
- let result = from_str ( string. slice_from ( 1 ) ) ; // Include the minus sign
114
+ let result = string. slice_from ( 1 ) . parse ( ) ; // Include the minus sign
115
115
assert ! ( result. is_some( ) ) ;
116
116
result
117
117
}
Original file line number Diff line number Diff line change @@ -469,14 +469,14 @@ fn consume_numeric(tokenizer: &mut Tokenizer) -> ComponentValue {
469
469
}
470
470
let ( value, int_value) = {
471
471
// TODO: handle overflow
472
- // Remove any + sign as int::from_str () does not parse them.
472
+ // Remove any + sign as int::parse () does not parse them.
473
473
let repr = if representation. starts_with ( "+" ) {
474
474
representation. slice_from ( 1 )
475
475
} else {
476
476
representation. as_slice ( )
477
477
} ;
478
- ( from_str :: < f64 > ( repr ) . unwrap ( ) , if is_integer {
479
- Some ( from_str :: < i64 > ( repr ) . unwrap ( ) )
478
+ ( repr . parse :: < f64 > ( ) . unwrap ( ) , if is_integer {
479
+ Some ( repr . parse :: < i64 > ( ) . unwrap ( ) )
480
480
} else {
481
481
None
482
482
} )
You can’t perform that action at this time.
0 commit comments