Fallout from deprecation
This commit handles the fallout from deprecating `_with` and `_equiv` methods.
This commit is contained in:
parent
80a2867ea7
commit
7213de1c49
21 changed files with 56 additions and 49 deletions
|
@ -901,7 +901,7 @@ impl Json {
|
|||
/// Otherwise, returns None.
|
||||
pub fn find<'a>(&'a self, key: &str) -> Option<&'a Json>{
|
||||
match self {
|
||||
&Object(ref map) => map.find_with(|s| key.cmp(s.as_slice())),
|
||||
&Object(ref map) => map.get(key),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
|
@ -926,7 +926,7 @@ impl Json {
|
|||
pub fn search<'a>(&'a self, key: &str) -> Option<&'a Json> {
|
||||
match self {
|
||||
&Object(ref map) => {
|
||||
match map.find_with(|s| key.cmp(s.as_slice())) {
|
||||
match map.get(key) {
|
||||
Some(json_value) => Some(json_value),
|
||||
None => {
|
||||
for (_, v) in map.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue