(&mut self, a: (usize, usize), b: (usize, usize))
| 735 | |
| 736 | #[inline] |
| 737 | pub fn swap_cells(&mut self, a: (usize, usize), b: (usize, usize)) -> bool { |
| 738 | let Some(a_index) = Self::flat_index(a.0, a.1) else { |
| 739 | return false; |
| 740 | }; |
| 741 | let Some(b_index) = Self::flat_index(b.0, b.1) else { |
| 742 | return false; |
| 743 | }; |
| 744 | self.as_mut_slice().swap(a_index, b_index); |
| 745 | true |
| 746 | } |
| 747 | |
| 748 | #[inline] |
| 749 | pub fn swap_flat(&mut self, a: usize, b: usize) -> bool { |
nothing calls this directly
no test coverage detected