Skip to main content

luaur_analysis/methods/
constraint_list_remove.rs

1use crate::records::constraint_list::ConstraintList;
2use crate::type_aliases::constraint_vertex::ConstraintVertex;
3
4impl ConstraintList {
5    pub fn remove(&mut self, vertex: ConstraintVertex) {
6        if let Some(entry) = self.present.find_mut(&vertex) {
7            // If the entry is true then we also need to decrement the number of
8            // entries in the constraint list.
9            if *entry {
10                self.entries -= 1;
11            }
12            *entry = false;
13        }
14    }
15}