mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 10:17:58 +00:00
Remove unnecessary lifetime
This commit is contained in:
@@ -57,7 +57,7 @@ impl Value {
|
||||
///
|
||||
/// assert!(obj.lookup("x.a").unwrap() == &Value::U64(1));
|
||||
/// ```
|
||||
pub fn lookup<'a>(&'a self, path: &'a str) -> Option<&'a Value> {
|
||||
pub fn lookup<'a>(&'a self, path: &str) -> Option<&'a Value> {
|
||||
let mut target = self;
|
||||
for key in path.split('.') {
|
||||
match target.find(key) {
|
||||
|
||||
Reference in New Issue
Block a user