aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-20 22:35:14 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-20 22:35:30 -0800
commit95c6161dcec9cdaada7e1507c6e536eeb7623ed4 (patch)
tree92d2a790b4e5963011c980b15d5d8f2ef4d866d4 /src/lib.rs
parent1346affca989975890b3a0d906b54c10c814e156 (diff)
downloadmilf-rs-95c6161dcec9cdaada7e1507c6e536eeb7623ed4.tar.gz
milf-rs-95c6161dcec9cdaada7e1507c6e536eeb7623ed4.zip
Update to rust master
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 6154144..49ff244 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -43,7 +43,7 @@
extern crate serialize;
-use std::collections::TreeMap;
+use std::collections::BTreeMap;
use std::str::FromStr;
use std::string;
@@ -79,7 +79,7 @@ pub enum Value {
pub type Array = Vec<Value>;
/// Type representing a TOML table, payload of the Value::Table variant
-pub type Table = TreeMap<string::String, Value>;
+pub type Table = BTreeMap<string::String, Value>;
impl Value {
/// Tests whether this and another value have the same type.
@@ -185,9 +185,9 @@ impl Value {
for key in path.split('.') {
match cur_value {
&Value::Table(ref hm) => {
- match hm.find_with(|k| key.cmp(k.as_slice())) {
+ match hm.get(key) {
Some(v) => cur_value = v,
- _ => return None
+ None => return None
}
},
&Value::Array(ref v) => {