提交 65a5b082 编写于 作者: S SparrowLii

fix the impl error in `insert_all`

上级 7e190153
......@@ -203,7 +203,9 @@ pub fn last_set_in(&self, range: impl RangeBounds<I> + Clone) -> Option<I> {
pub fn insert_all(&mut self) {
self.clear();
self.map.push((0, self.domain.try_into().unwrap()));
if let Some(end) = self.domain.checked_sub(1) {
self.map.push((0, end.try_into().unwrap()));
}
debug_assert!(self.check_invariants());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册