I love performance
This commit is contained in:
parent
9367dc0caf
commit
338888133c
2 changed files with 8 additions and 9 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -34,7 +34,9 @@ impl Adjacencies {
|
|||
|
||||
pub fn reset(&mut self) {
|
||||
self.amap.iter_mut().for_each(|bitvec| {
|
||||
bitvec.clear();
|
||||
if bitvec.any() {
|
||||
bitvec.clear();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +47,7 @@ impl Adjacencies {
|
|||
})
|
||||
}
|
||||
|
||||
fn intersect(&self, other: &Adjacencies) -> Adjacencies {
|
||||
pub fn intersect(&self, other: &Adjacencies) -> Adjacencies {
|
||||
Adjacencies {
|
||||
amap: self
|
||||
.amap
|
||||
|
|
@ -154,10 +156,6 @@ impl Seating {
|
|||
}
|
||||
}
|
||||
|
||||
fn make_clone(&self) -> Self {
|
||||
self.clone()
|
||||
}
|
||||
|
||||
fn empty_table_coords(&self) -> Vec<(usize, Side)> {
|
||||
self.people_top
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue