mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-29 14:59:49 +00:00
Remove unnecessary lifetime
This commit is contained in:
1 parent
81d617bd93
commit
859cdcc815
1 file changed
+1
-1
@@ -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