@@ -246,13 +246,7 @@ impl Formatter<&ExtendedBigDecimal> for Float {
246246 */
247247 let ( abs, negative) = match e {
248248 ExtendedBigDecimal :: BigDecimal ( bd) => {
249- // Workaround printing bug in BigDecimal, force 0 to scale 0.
250- // TODO: Remove after https://github.com/akubera/bigdecimal-rs/issues/144 is fixed.
251- if bd. is_zero ( ) {
252- ( ExtendedBigDecimal :: zero ( ) , false )
253- } else {
254- ( ExtendedBigDecimal :: BigDecimal ( bd. abs ( ) ) , bd. is_negative ( ) )
255- }
249+ ( ExtendedBigDecimal :: BigDecimal ( bd. abs ( ) ) , bd. is_negative ( ) )
256250 }
257251 ExtendedBigDecimal :: MinusZero => ( ExtendedBigDecimal :: zero ( ) , true ) ,
258252 ExtendedBigDecimal :: Infinity => ( ExtendedBigDecimal :: Infinity , false ) ,
@@ -730,12 +724,8 @@ mod test {
730724 }
731725
732726 #[ test]
733- #[ ignore = "Need https://github.com/akubera/bigdecimal-rs/issues/144 to be fixed" ]
734727 fn decimal_float_zero ( ) {
735728 use super :: format_float_decimal;
736- // We've had issues with "0e10"/"0e-10" formatting.
737- // TODO: Enable after https://github.com/akubera/bigdecimal-rs/issues/144 is fixed,
738- // as our workaround is in .fmt.
739729 let f = |digits, scale| {
740730 format_float_decimal ( & BigDecimal :: from_bigint ( digits, scale) , 6 , ForceDecimal :: No )
741731 } ;
0 commit comments