diff --git a/src/jsonpath.rs b/src/jsonpath.rs index e7a32e0..c39cd13 100644 --- a/src/jsonpath.rs +++ b/src/jsonpath.rs @@ -128,7 +128,7 @@ mod tests { use crate::path::JsonLike; use crate::JsonPathValue::{NoValue, Slice}; use crate::{jp_v, JsonPath, JsonPathParserError, JsonPathValue}; - use crate::{JsonPathQuery, JsonPtr}; + use crate::{JsonPathQuery}; use serde_json::{json, Value}; use std::ops::Deref; @@ -909,7 +909,7 @@ mod tests { let path: Box = Box::from(JsonPath::try_from("$.[?(@.verb == 'RUN')]")?); let elem = path .find_as_path(&json) - .get(0) + .first() .cloned() .ok_or(JsonPathParserError::InvalidJsonPath("".to_string()))?; diff --git a/src/path/mod.rs b/src/path/mod.rs index 85848e5..ffac849 100644 --- a/src/path/mod.rs +++ b/src/path/mod.rs @@ -1,6 +1,6 @@ use std::fmt::Debug; -use crate::{jsp_idx, jsp_obj, JsonPathParserError, JsonPathStr, JsonPathValue, JsonPtr}; +use crate::{jsp_idx, jsp_obj, JsonPathParserError, JsonPathStr, JsonPathValue}; use regex::Regex; use serde_json::{json, Value};