Skip to content

Commit

Permalink
Upgrade RoaringBitmap Crate
Browse files Browse the repository at this point in the history
Now that we use a newer version of Rust we can update to the
latest version of this crate.

Side Change:
- Minor interface nit missed in recent block allocator review
  • Loading branch information
sdimitro committed Sep 20, 2021
1 parent a1a6dd1 commit bba40d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/zfs_object_agent/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/zfs_object_agent/zettacache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ more-asserts = "0.2.1"
nix = "0.22.0"
num = "0.4.0"
rand = "0.8.3"
roaring = "=0.6.6" # XXX: update to latest once we get to Rust Version 1.49.0+
roaring = "0.7.0"
seahash = "4.1.0"
serde = { version = "1.0.125", features = ["derive"] }
serde_json = "1.0.64"
Expand Down
6 changes: 3 additions & 3 deletions cmd/zfs_object_agent/zettacache/src/bitmap_range_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ pub struct BitmapRangeIter<'a> {
}

impl<'a> BitmapRangeIter<'a> {
fn new(bitmap_iter: Fuse<Iter<'a>>) -> BitmapRangeIter<'a> {
fn new(bitmap: &RoaringBitmap) -> BitmapRangeIter {
BitmapRangeIter {
bitmap_iter,
bitmap_iter: bitmap.iter().fuse(),
current_range: None,
}
}
Expand Down Expand Up @@ -80,6 +80,6 @@ pub trait BitmapRangeIterator {

impl BitmapRangeIterator for RoaringBitmap {
fn iter_ranges(&self) -> BitmapRangeIter {
BitmapRangeIter::new(self.iter().fuse())
BitmapRangeIter::new(self)
}
}

0 comments on commit bba40d4

Please sign in to comment.