Merge pull request #103 from MarkSwanson/lookup-lifetime-enhancement
lookup() and lookup_mut() lifetime enhancements.
This commit is contained in:
commit
7363dbe7f5
|
@ -180,7 +180,7 @@ impl Value {
|
||||||
/// let no_bar = value.lookup("test.bar");
|
/// let no_bar = value.lookup("test.bar");
|
||||||
/// assert_eq!(no_bar.is_none(), true);
|
/// assert_eq!(no_bar.is_none(), true);
|
||||||
/// ```
|
/// ```
|
||||||
pub fn lookup<'a>(&'a self, path: &'a str) -> Option<&'a Value> {
|
pub fn lookup(&self, path: &str) -> Option<&Value> {
|
||||||
let ref path = match Parser::new(path).lookup() {
|
let ref path = match Parser::new(path).lookup() {
|
||||||
Some(path) => path,
|
Some(path) => path,
|
||||||
None => return None,
|
None => return None,
|
||||||
|
|
Loading…
Reference in a new issue