Skip to content

Commit 29859b4

Browse files
committed
Separate Formatting decimal point case in cformat
1 parent dc3a300 commit 29859b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vm/src/cformat.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ enum CNumberType {
7575
#[derive(Debug, PartialEq)]
7676
enum CFloatType {
7777
Exponent(CFormatCase),
78-
PointDecimal,
78+
PointDecimal(CFormatCase),
7979
General(CFormatCase),
8080
}
8181

@@ -251,7 +251,7 @@ impl CFormatSpec {
251251
};
252252

253253
let magnitude_string = match self.format_type {
254-
CFormatType::Float(CFloatType::PointDecimal) => {
254+
CFormatType::Float(CFloatType::PointDecimal(_)) => {
255255
let precision = match self.precision {
256256
Some(CFormatQuantity::Amount(p)) => p,
257257
_ => 6,
@@ -747,12 +747,12 @@ fn parse_format_type(text: &str) -> Result<(CFormatType, &str, char), CFormatErr
747747
next_char.unwrap(),
748748
)),
749749
Some('f') => Ok((
750-
CFormatType::Float(PointDecimal),
750+
CFormatType::Float(PointDecimal(Lowercase)),
751751
chars.as_str(),
752752
next_char.unwrap(),
753753
)),
754754
Some('F') => Ok((
755-
CFormatType::Float(PointDecimal),
755+
CFormatType::Float(PointDecimal(Uppercase)),
756756
chars.as_str(),
757757
next_char.unwrap(),
758758
)),

0 commit comments

Comments
 (0)