bit map: change to use derived std::fmt::Debug implementation

This commit is contained in:
ice_iix 2021-12-30 10:09:17 -08:00
parent 48e5375451
commit 9021bfa47f
1 changed files with 1 additions and 12 deletions

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#[derive(Debug)]
pub struct Map {
bits: Vec<u64>,
pub bit_size: usize,
@ -116,15 +117,3 @@ impl Map {
}
}
}
use std::fmt;
impl fmt::Debug for Map {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "BitMap({})=<", self.bit_size)?;
for i in 0..self.bit_size {
write!(f, "{}", self.get(i))?;
}
write!(f, ">")
}
}