Money has two fields, a rust_decimal::Decimal instance and a reference. Both implement Copy, so Money should be able to derive Copy. The Copy documentation recommends that ‘[g]enerally speaking, if your type can implement Copy, it should.’ What do you think about making Money implement Copy? This would make calculations much less awkward.
Money
has two fields, arust_decimal::Decimal
instance and a reference. Both implementCopy
, soMoney
should be able to deriveCopy
. TheCopy
documentation recommends that ‘[g]enerally speaking, if your type can implement Copy, it should.’ What do you think about makingMoney
implementCopy
? This would make calculations much less awkward.