Update for open-source Decimal fixes (#16)

* Update to future-proof usage of Decimal.significand

* Update all remaining uses of Decimal.significand

* Update usage of `Decimal(sign:exponent:significand:)`

* Apply suggestions from code review

Co-authored-by: Cory Benfield <lukasa@apple.com>

Co-authored-by: Cory Benfield <lukasa@apple.com>
This commit is contained in:
Xiaodi WuandCory Benfield authored and GitHub committed 2022-01-04 16:24:20 +00:00
1 parent e31cbd3120
commit 8c5c9aa00d
2 files changed
+7 -7

No files matched your search

@@ -116,7 +116,7 @@ extension BareItemDecoder: SingleValueDecodingContainer {
return Decimal(sign: pseudoDecimal.mantissa > 0 ? .plus : .minus,
exponent: Int(pseudoDecimal.exponent),
significand: Decimal(pseudoDecimal.mantissa))
significand: Decimal(pseudoDecimal.mantissa.magnitude))
}
func decodeNil() -> Bool {