feat: impl Sub for ExBudget
This commit is contained in:
parent
f250d3df84
commit
141a9aef30
|
@ -47,6 +47,17 @@ impl Default for ExBudget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::ops::Sub for ExBudget {
|
||||||
|
type Output = Self;
|
||||||
|
|
||||||
|
fn sub(self, rhs: Self) -> Self::Output {
|
||||||
|
ExBudget {
|
||||||
|
mem: self.mem - rhs.mem,
|
||||||
|
cpu: self.cpu - rhs.cpu,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct CostModel {
|
pub struct CostModel {
|
||||||
pub machine_costs: MachineCosts,
|
pub machine_costs: MachineCosts,
|
||||||
|
|
Loading…
Reference in New Issue