FixedDecimal *ed
methods should be infallible
#4857
Labels
2.0-breaking
Changes that are breaking API changes
C-numbers
Component: Numbers, units, currencies
S-small
Size: One afternoon (small bug fix or enhancement)
Milestone
This function is misleading:
In the error case, it returns
other
, but it still throws awayself
. It should probably return a tuple containing both FixedDecimals. It makes it tempting to write code such asmantissa.concatenated_end(fraction).unwrap_or_else(|fd| fd)
, which is wrong because it promotesfraction
when it should probably keepmantissa
and throw awayfraction
.I think we should delete this function since it is only sugar over
concatenate_end
, which is harder to use incorrectly.The text was updated successfully, but these errors were encountered: