mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-26 05:07:56 +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));
|
/// 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;
|
let mut target = self;
|
||||||
for key in path.split('.') {
|
for key in path.split('.') {
|
||||||
match target.find(key) {
|
match target.find(key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user