From 60410efd1abd0815593871bc2fcea85414879055 Mon Sep 17 00:00:00 2001 From: AmauryBrodu <60550980+AmauryBrodu@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:05:07 +0200 Subject: [PATCH] bug fix of bitmap constructor --- src/utility/bitmap.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utility/bitmap.rs b/src/utility/bitmap.rs index d66dd2e..4af76a1 100644 --- a/src/utility/bitmap.rs +++ b/src/utility/bitmap.rs @@ -20,15 +20,13 @@ impl BitMap { /// ### Parameters /// - **nitems** is the number of bits in the bitmap. ///---------------------------------------------------------------------- - pub fn init_bitmap(&self, n_items: usize) -> BitMap { + pub fn init_bitmap(n_items: usize) -> BitMap { let mut tmp: Vec; BitMap{ num_bits: n_items, num_words: (n_items + SECTOR_SIZE as usize -1) / SECTOR_SIZE as usize, map: tmp, - }; - - *self + } } /// Set the "nth" bit in a bitmap.