Fix new deprecations from collections reform

This commit is contained in:
Renato Zannon
2014-11-07 18:28:31 -02:00
parent ba67a8b3b2
commit bad51b197f
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -324,7 +324,7 @@ impl Json {
/// Otherwise, returns None.
pub fn find<'a>(&'a self, key: &string::String) -> Option<&'a Json>{
match self {
&Object(ref map) => map.find(key),
&Object(ref map) => map.get(key),
_ => None
}
}
@@ -349,7 +349,7 @@ impl Json {
pub fn search<'a>(&'a self, key: &string::String) -> Option<&'a Json> {
match self {
&Object(ref map) => {
match map.find(key) {
match map.get(key) {
Some(json_value) => Some(json_value),
None => {
let mut value : Option<&'a Json> = None;