From 8e8523413436cdb92ccfc459d2dd69e07bd8d29a Mon Sep 17 00:00:00 2001 From: yt2b Date: Mon, 2 Jan 2023 21:14:32 +0900 Subject: [PATCH] Fix format_int --- common/src/format.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/common/src/format.rs b/common/src/format.rs index c8849895d..f9cf05e95 100644 --- a/common/src/format.rs +++ b/common/src/format.rs @@ -513,13 +513,9 @@ impl FormatSpec { Some(_) | None => Err("%c arg not in range(0x110000)"), }, }, - Some(FormatType::GeneralFormatUpper) => { - Err("Unknown format code 'G' for object of type 'int'") - } - Some(FormatType::GeneralFormatLower) => { - Err("Unknown format code 'g' for object of type 'int'") - } - Some(FormatType::FixedPointUpper) + Some(FormatType::GeneralFormatUpper) + | Some(FormatType::GeneralFormatLower) + | Some(FormatType::FixedPointUpper) | Some(FormatType::FixedPointLower) | Some(FormatType::ExponentUpper) | Some(FormatType::ExponentLower)