From 95c6161dcec9cdaada7e1507c6e536eeb7623ed4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 20 Dec 2014 22:35:14 -0800 Subject: Update to rust master --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib.rs') 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; /// Type representing a TOML table, payload of the Value::Table variant -pub type Table = TreeMap; +pub type Table = BTreeMap; 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) => { -- cgit v1.2.3