Takes a mutable trait object reference
(calc: &mut dyn Calculator, val: i32)
| 78 | impl DynSource for I32Source { |
| 79 | type Item = i32; |
| 80 | |
| 81 | fn next_value(&mut self) -> Option<Self::Item> { |
| 82 | let value = self.next; |
| 83 | self.next += 1; |
| 84 | Some(value) |
| 85 | } |