Skip to content

Commit 74c2393

Browse files
committed
fix test
1 parent 532c929 commit 74c2393

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ The path is supported with the limited elements namely only the elements with th
226226
{"verb": "DO NOT RUN"}
227227
]);
228228

229-
let path = json.query_only_path("$.[?(@.verb == 'RUN')]")?;
229+
let path = json.query_only_path("$[?(@.verb == 'RUN')]")?;
230230
let elem = path.first().unwrap_or_default();
231231

232232
if let Some(v) = json

src/query.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,16 @@ mod tests {
170170
],
171171
"expensive": 10 }"#
172172
}
173+
174+
#[test]
173175
fn update_by_path_test() -> Queried<()> {
174176
let mut json = json!([
175177
{"verb": "RUN","distance":[1]},
176178
{"verb": "TEST"},
177179
{"verb": "DO NOT RUN"}
178180
]);
179181

180-
let path = json.query_only_path("$.[?(@.verb == 'RUN')]")?;
182+
let path = json.query_only_path("$[?(@.verb == 'RUN')]")?;
181183
let elem = path.first().cloned().unwrap_or_default();
182184

183185
if let Some(v) = json

0 commit comments

Comments
 (0)