Skip to content

Commit

Permalink
fix for api change (#1467)
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz authored Aug 23, 2022
1 parent 998b126 commit 11edd6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fastfield_codecs/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ mod tests {
) {
let mut bytes = vec![];
S::serialize(&mut bytes, &data, stats_from_vec(data)).unwrap();
let reader = R::open_from_bytes(&bytes).unwrap();
let reader = R::open_from_bytes(OwnedBytes::new(bytes)).unwrap();
b.iter(|| {
for pos in value_iter() {
reader.get_u64(pos as u64, &bytes);
reader.get_u64(pos as u64);
}
});
}
Expand All @@ -49,6 +49,7 @@ mod tests {
});
}

use ownedbytes::OwnedBytes;
use test::Bencher;
#[bench]
fn bench_fastfield_bitpack_create(b: &mut Bencher) {
Expand Down
2 changes: 1 addition & 1 deletion fastfield_codecs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl FastFieldDataAccess for Vec<u64> {
self[position as usize]
}
fn iter<'b>(&'b self) -> Box<dyn Iterator<Item = u64> + 'b> {
Box::new((&self as &[u64]).iter().cloned())
Box::new((self as &[u64]).iter().cloned())
}
}

Expand Down

0 comments on commit 11edd6b

Please sign in to comment.