1
Fork 0

Remove needless lifetimes

This commit is contained in:
Jeremy Stucki 2019-06-25 19:43:18 +02:00 committed by Jeremy Stucki
parent 5748825cc8
commit 47ea8ae022
No known key found for this signature in database
GPG key ID: 8F548A5A2ED13F58
16 changed files with 26 additions and 26 deletions

View file

@ -1031,7 +1031,7 @@ impl Json {
/// If the Json value is an Object, returns the value associated with the provided key.
/// Otherwise, returns None.
pub fn find<'a>(&'a self, key: &str) -> Option<&'a Json>{
pub fn find(&self, key: &str) -> Option<&Json> {
match *self {
Json::Object(ref map) => map.get(key),
_ => None
@ -1052,7 +1052,7 @@ impl Json {
/// If the Json value is an Object, performs a depth-first search until
/// a value associated with the provided key is found. If no value is found
/// or the Json value is not an Object, returns `None`.
pub fn search<'a>(&'a self, key: &str) -> Option<&'a Json> {
pub fn search(&self, key: &str) -> Option<&Json> {
match self {
&Json::Object(ref map) => {
match map.get(key) {