Reduce FormattingOptions to 64 bits.
This commit is contained in:
parent
0998d4095b
commit
90645c187c
7 changed files with 253 additions and 213 deletions
|
@ -86,7 +86,7 @@ where
|
|||
true => flt2dec::Sign::MinusPlus,
|
||||
};
|
||||
|
||||
if let Some(precision) = fmt.options.precision {
|
||||
if let Some(precision) = fmt.options.get_precision() {
|
||||
float_to_decimal_common_exact(fmt, num, sign, precision)
|
||||
} else {
|
||||
let min_precision = 0;
|
||||
|
@ -162,7 +162,7 @@ where
|
|||
true => flt2dec::Sign::MinusPlus,
|
||||
};
|
||||
|
||||
if let Some(precision) = fmt.options.precision {
|
||||
if let Some(precision) = fmt.options.get_precision() {
|
||||
// 1 integral digit + `precision` fractional digits = `precision + 1` total digits
|
||||
float_to_exponential_common_exact(fmt, num, sign, precision + 1, upper)
|
||||
} else {
|
||||
|
@ -180,7 +180,7 @@ where
|
|||
true => flt2dec::Sign::MinusPlus,
|
||||
};
|
||||
|
||||
if let Some(precision) = fmt.options.precision {
|
||||
if let Some(precision) = fmt.options.get_precision() {
|
||||
// this behavior of {:.PREC?} predates exponential formatting for {:?}
|
||||
float_to_decimal_common_exact(fmt, num, sign, precision)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue