diff --git a/src/lib.rs b/src/lib.rs index d7caebb..1120788 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -214,7 +214,7 @@ pub fn compile(path: &str) -> impl FnMut(&Value) -> Result, JsonPath /// ]); /// ``` #[allow(clippy::needless_lifetimes)] -pub fn selector<'a>(json: &'a Value) -> impl FnMut(&'a str) -> Result, JsonPathError> { +pub fn selector<'a>(json: &'a Value) -> impl FnMut(&str) -> Result, JsonPathError> { let mut selector = Selector::default(); let _ = selector.value(json); move |path: &str| selector.str_path(path)?.reset_value().select()