forked from diesel-rs/diesel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly encode
BigDecimal
values whose first digit is 10k
When serializing a numeric column, we need to take a decimal value and convert it to a list of its digits in base 10k. The serialization code had a bug when the first digit was exactly `10000`, resulting in the digits being `[10000, ...]` instead of `[1, 0, ...]`. This bug only affected the integral part, as the decimal portion uses different logic in order ot strip trailing zeroes. Fixes diesel-rs#1044.
- Loading branch information
Showing
3 changed files
with
46 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters