mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 04:48:01 +00:00
Fix new deprecations from collections reform
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user