Minor optimization

pull/2/head
Mark 2023-07-28 11:41:25 -07:00
parent 2c434c4c6b
commit a489eec482
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ impl Quantity {
for (uo, _) in other.unit.get_val() {
// Use generalized compatible_with check to match reciprocal units
// (for example, 1Hz * 1 sec.)
let f = uo.to_base().unit.compatible_with_power(&us.to_base().unit);
let f = Unit::from_free(*uo).compatible_with_power(&Unit::from_free(*us));
if f.is_none() { continue; }
let f = f.unwrap();