(&self, mutation: F)
| 13 | } |
| 14 | |
| 15 | pub fn dispatch<F>(&self, mutation: F) |
| 16 | where |
| 17 | F: FnOnce(&mut T), |
| 18 | { |
| 19 | let mut state = self.state.borrow_mut(); |
| 20 | mutation(&mut state); |
| 21 | } |
| 22 | |
| 23 | pub fn get_state(&self) -> T { |
| 24 | self.state.borrow().clone() |
nothing calls this directly
no outgoing calls
no test coverage detected