Could you help me further? I'm not sure how to go from here

```
use std::collections::BTreeMap;
#[derive(Debug)]
pub enum Operation {
ADDITION,
SUBTRACTION,
DIVISION,
MULTIPLICATION,
NONE,
}
pub struct UnitHelperI32 {
stack: BTreeMap<u64, (i32, Operation)>,
count: u64,
}
pub struct UnitHelperF32 {
stack: BTreeMap<u64, (f32, Operation)>,
count: u64,
}
trait Arithmetic<T> {
fn new() -> Self;
fn get_stack(&mut self) -> &BTreeMap<u64, (T, Operation)>;
fn erase_operation(&mut self, id: u64);
fn add<V>(&mut self, operand: V) -> u64 where V: Into<T> + Copy;
fn sub<V>(&mut self, operand: V) -> u64 where V: Into<T> + Copy;
fn div<V>(&mut self, operand: V) -> u64 where V: Into<T> + Copy;
fn mul<V>(&mut self, operand: V) -> u64 where V: Into<T> + Copy;
}
impl<T> Arithmetic<T> for UnitHelperI32{
fn new() -> Self {
Self {stack: BTreeMap::new(), count: 0}
}
fn get_stack(&mut self) -> &BTreeMap<u64, (i32, Operation)> {
&self.stack
}
fn erase_operation(&mut self, id: u64) {
self.stack.insert(id, (0, Operation::NONE));
}
fn add<V>(&mut self, operand: V) -> u64 where V: Into<i32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::ADDITION));
let count = self.count;
self.count += 1;
count
}
fn sub<V>(&mut self, operand: V) -> u64 where V: Into<i32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::SUBTRACTION));
let count = self.count;
self.count += 1;
count
}
fn div<V>(&mut self, operand: V) -> u64 where V: Into<i32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::DIVISION));
let count = self.count;
self.count += 1;
count
}
fn mul<V>(&mut self, operand: V) -> u64 where V: Into<i32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::MULTIPLICATION));
let count = self.count;
self.count += 1;
count
}
}
impl<T> Arithmetic<T> for UnitHelperF32{
fn new() -> Self {
Self {stack: BTreeMap::new(), count: 0}
}
fn get_stack(&mut self) -> &BTreeMap<u64, (f32, Operation)> {
&self.stack
}
fn erase_operation(&mut self, id: u64) {
self.stack.insert(id, (0.0, Operation::NONE));
}
fn add<V>(&mut self, operand: V) -> u64 where V: Into<f32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::ADDITION));
let count = self.count;
self.count += 1;
count
}
fn sub<V>(&mut self, operand: V) -> u64 where V: Into<f32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::SUBTRACTION));
let count = self.count;
self.count += 1;
count
}
fn div<V>(&mut self, operand: V) -> u64 where V: Into<f32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::DIVISION));
let count = self.count;
self.count += 1;
count
}
fn mul<V>(&mut self, operand: V) -> u64 where V: Into<f32> + Copy {
self.stack.insert(self.count, (operand.into(), Operation::MULTIPLICATION));
let count = self.count;
self.count += 1;
count
}
}
struct Calculator {}
impl Calculator {
pub fn result(&mut self, helper: &mut impl Arithmetic, initial: i32) -> i32 {
let mut v = initial;
let mut overflow = false;
for (_id, (value, operation)) in helper.get_stack() {
match operation {
Operation::ADDITION => {
match v.overflowing_add(*value) {
(value, false) => v = value,
(v, true) => { overflow = true; }
}
}
Operation::SUBTRACTION => {
match v.overflowing_sub(*value) {
(value, false) => v = value,
(_, true) => { overflow = true; }
}
}
Operation::DIVISION => {
match v.overflowing_div(*value) {
(value, false) => v = value,
(_, true) => { overflow = true; }
}
}
Operation::MULTIPLICATION => {
match v.overflowing_mul(*value) {
(value, false) => v = value,
(_, true) => { overflow = true; }
}
}
Operation::NONE => {}
}
if overflow {
break;
}
}
v
}
}
fn main(){
let mut calculator = Calculator {};
let mut helper = UnitHelperF32::new();
helper.add(1.0);
let id = helper.mul(2000.0);
helper.sub(10.0);
helper.erase_operation(id);
println!(": {:?}",helper.get_stack());
let result = calculator.result(&mut helper,1000000000);
println!("result: {:?}", result);
}
```