serde_json::Value clone 제거

This commit is contained in:
freestrings
2019-03-11 17:35:15 +09:00
parent ba57ae0ea5
commit 1a3104c5db
30 changed files with 1333 additions and 672 deletions

View File

@ -14,8 +14,8 @@ fn read_json(path: &str) -> String {
fn main() {
let string = read_json("../example.json");
let json: Value = serde_json::from_str(string.as_str()).unwrap();
let mut reader = jsonpath::reader(json);
let mut selector = jsonpath::selector(json);
for _ in 1..100000 {
let _ = reader(r#"$..book[?(@.price<30 && @.category=="fiction")]"#).unwrap();
let _ = selector(r#"$..book[?(@.price<30 && @.category=="fiction")]"#).unwrap();
}
}