File tree 1 file changed +4
-18
lines changed
1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -283,24 +283,10 @@ impl Value {
283
283
println ! ( "\t {:?}" , rhs) ;
284
284
let mut components = self . unit . components . clone ( ) ;
285
285
for rhs_component in rhs. unit . components {
286
- let mut self_has_unit = false ;
287
- for self_component in & self . unit . components {
288
- if compare_hashmaps (
289
- & self_component. unit . base_units ,
290
- & rhs_component. unit . base_units ,
291
- int,
292
- ) ? {
293
- self_has_unit = true ;
294
- break ;
295
- }
296
- }
297
- let new_exponent = if self_has_unit {
298
- -rhs_component. exponent
299
- } else {
300
- rhs_component. exponent
301
- } ;
302
- println ! ( "\t \t {:?}" , new_exponent) ;
303
- components. push ( UnitExponent :: new ( rhs_component. unit , new_exponent) ) ;
286
+ components. push ( UnitExponent :: new (
287
+ rhs_component. unit ,
288
+ -rhs_component. exponent ,
289
+ ) ) ;
304
290
}
305
291
let value =
306
292
Exact :: new ( self . value , self . exact ) . div ( & Exact :: new ( rhs. value , rhs. exact ) , int) ?;
You can’t perform that action at this time.
0 commit comments