mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-06-13 16:11:26 +00:00
compiled_path 인자 타입 변경, compute_path 로직 개선
This commit is contained in:
@ -14,8 +14,8 @@ exclude = ["artifacts.json", "index.node"]
|
||||
neon-build = "0.2.0"
|
||||
|
||||
[dependencies]
|
||||
#jsonpath_lib = "0.2.0"
|
||||
jsonpath_lib = {path="../../"}
|
||||
jsonpath_lib = "0.2.0"
|
||||
#jsonpath_lib = { path = "../../" }
|
||||
neon = "0.2.0"
|
||||
neon-serde = "0.1.1"
|
||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||
|
@ -110,7 +110,7 @@ impl SelectorCls {
|
||||
|
||||
fn select(&self) -> String {
|
||||
let node = match &self.node {
|
||||
Some(node) => node.clone(),
|
||||
Some(node) => node,
|
||||
None => panic!("{:?}", JsonPathError::EmptyPath)
|
||||
};
|
||||
|
||||
@ -120,7 +120,7 @@ impl SelectorCls {
|
||||
};
|
||||
|
||||
let mut selector = Selector::new();
|
||||
selector.compiled_path(node.clone());
|
||||
selector.compiled_path(node);
|
||||
selector.value(&value);
|
||||
match selector.select_as_str() {
|
||||
Ok(ret) => ret,
|
||||
|
Reference in New Issue
Block a user