We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
bsearch
1 parent 4d7425f commit 963814bCopy full SHA for 963814b
jaq-json/src/lib.rs
@@ -385,7 +385,7 @@ fn base() -> Box<[Filter<RunPtr<Val>>]> {
385
x.indices(&v).map(|idxs| idxs.map(to_int).collect())
386
})
387
}),
388
- ("bsearch", v(1), |_, cv| {
+ ("bsearch", v(1), |cv| {
389
let to_idx = |r: Result<_, _>| r.map_or_else(|i| -1 - i as isize, |i| i as isize);
390
unary(cv, move |a, x| {
391
a.as_arr().map(|a| Val::Int(to_idx(a.binary_search(&x))))
0 commit comments