move Quantity to its own module, add some Traits for convenience

This commit is contained in:
Sebastian Kuzminsky 2025-03-13 15:58:47 -06:00
parent a41795677b
commit 6677f41af2
5 changed files with 73 additions and 41 deletions

View file

@ -134,7 +134,7 @@ impl Repo {
.ok_or(anyhow::Error::msg(format!(
"can't find input capital for {input_name}"
)))?;
if input_capital.quantity.unit != Some(crate::recipe::Unit::USDollar) {
if input_capital.quantity.unit != Some(crate::quantity::Unit::USDollar) {
return Err(anyhow::Error::msg(format!(
"{} input capital does not have units USDollar",
input_name