Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/bitset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@ impl<Conf: Config> BitSet<Conf> {
///
/// Panics, if `index` is out of index range.
pub fn insert(&mut self, index: usize){
assert!(Self::is_in_range(index), "{index} is out of index range!");
assert!(
Self::is_in_range(index),
"{index} is out of index range (max={})!"
Self::max_capacity(),
);

// That's indices to next level
let (level0_index, level1_index, data_index) = Self::level_indices(index);
Expand Down Expand Up @@ -392,4 +396,4 @@ impl<Conf: Config> LevelMasksIterExt for BitSet<Conf> {
}
}

impl_bitset!(impl<Conf> for ref BitSet<Conf> where Conf: Config);
impl_bitset!(impl<Conf> for ref BitSet<Conf> where Conf: Config);
Loading