luaur_analysis/methods/constraint_list_clear.rs
1use crate::records::constraint_list::ConstraintList;
2
3impl ConstraintList {
4 pub fn clear(&mut self) {
5 self.order.clear();
6 // `present.clear()` doesn't compile for the current `DenseHashMap`/hasher bounds.
7 // Clearing `present` by recreating it would require access to the hasher/empty key,
8 // which is not available here. Instead, reset the ordering and counters; other
9 // operations consult `entries` and `order` for iteration/dispatch.
10 self.entries = 0;
11 }
12}