aboutsummaryrefslogtreecommitdiff
path: root/src/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-23 08:01:35 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-23 08:01:45 -0800
commit31ee496621384f9c6d670c32d576411cfcc79bc1 (patch)
treee899f6d827d82c552aecee0c1dd15452fb2f43e7 /src/parser.rs
parentf16498b8db0d960905b530c8d726155798843ae7 (diff)
downloadmilf-rs-31ee496621384f9c6d670c32d576411cfcc79bc1.tar.gz
milf-rs-31ee496621384f9c6d670c32d576411cfcc79bc1.zip
Update to rust master
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 750cfec..00eafc3 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -13,7 +13,7 @@ use Value::{mod, Array, Table, Float, Integer, Boolean, Datetime};
/// list of errors which have occurred during parsing.
pub struct Parser<'a> {
input: &'a str,
- cur: str::CharOffsets<'a>,
+ cur: str::CharIndices<'a>,
/// A list of all errors which have occurred during parsing.
///
@@ -471,12 +471,12 @@ impl<'a> Parser<'a> {
if self.input.char_at_reverse(end) == '.' {
None
} else {
- from_str::<f64>(self.input.slice(start, end)).map(Float)
+ self.input.slice(start, end).parse().map(Float)
}
} else if !negative && self.eat('-') {
self.datetime(start, end + 1)
} else {
- from_str::<i64>(self.input.slice(start, end)).map(Integer)
+ self.input.slice(start, end).parse().map(Integer)
};
if ret.is_none() {
self.errors.push(ParserError {