diff options
author | Alex Crichton <alex@alexcrichton.com> | 2014-12-20 22:35:14 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-20 22:35:30 -0800 |
commit | 95c6161dcec9cdaada7e1507c6e536eeb7623ed4 (patch) | |
tree | 92d2a790b4e5963011c980b15d5d8f2ef4d866d4 /src/parser.rs | |
parent | 1346affca989975890b3a0d906b54c10c814e156 (diff) | |
download | milf-rs-95c6161dcec9cdaada7e1507c6e536eeb7623ed4.tar.gz milf-rs-95c6161dcec9cdaada7e1507c6e536eeb7623ed4.zip |
Update to rust master
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parser.rs b/src/parser.rs index 9143673..750cfec 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,5 +1,5 @@ use std::char; -use std::collections::TreeMap; +use std::collections::BTreeMap; use std::error::Error; use std::num::FromStrRadix; use std::str; @@ -140,7 +140,7 @@ impl<'a> Parser<'a> { /// If an error occurs, the `errors` field of this parser can be consulted /// to determine the cause of the parse failure. pub fn parse(&mut self) -> Option<TomlTable> { - let mut ret = TreeMap::new(); + let mut ret = BTreeMap::new(); loop { self.ws(); match self.cur.clone().next() { @@ -179,7 +179,7 @@ impl<'a> Parser<'a> { } // Build the section table - let mut table = TreeMap::new(); + let mut table = BTreeMap::new(); if !self.values(&mut table) { return None } if array { self.insert_array(&mut ret, section, Table(table), start) @@ -677,7 +677,7 @@ impl<'a> Parser<'a> { } // Initialize an empty table as part of this sub-key - tmp.insert(part.clone(), Table(TreeMap::new())); + tmp.insert(part.clone(), Table(BTreeMap::new())); match *tmp.get_mut(&part).unwrap() { Table(ref mut inner) => cur = inner, _ => unreachable!(), @@ -695,7 +695,7 @@ impl<'a> Parser<'a> { let key = key.to_string(); let mut added = false; if !into.contains_key(&key) { - into.insert(key.clone(), Table(TreeMap::new())); + into.insert(key.clone(), Table(BTreeMap::new())); added = true; } match into.get_mut(&key) { |