997: fix(core): fix benchmark in core with types r=LegendreM a=neeldug

forces a dereference onto query and then creates an option to wrap the
query

Closes #994 

Co-authored-by: nd419 <5161147+neeldug@users.noreply.github.com>
This commit is contained in:
bors[bot] 2020-10-15 16:41:58 +00:00 committed by GitHub
commit 452d456fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let bench_name = BenchmarkId::from_parameter(format!("{:?}", query)); let bench_name = BenchmarkId::from_parameter(format!("{:?}", query));
group.bench_with_input(bench_name, &query, |b, query| b.iter(|| { group.bench_with_input(bench_name, &query, |b, query| b.iter(|| {
let builder = index.query_builder(); let builder = index.query_builder();
builder.query(&reader, query, 0..20).unwrap(); builder.query(&reader, Some(*query), 0..20).unwrap();
})); }));
} }
group.finish(); group.finish();