mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 19:24:57 +08:00
Add string typed formatting
This commit is contained in:
1 parent
a0a73e5d97
commit
1b2d179b38
1 file changed
+1
@@ -227,6 +227,7 @@ fn parse_grouping_option(text: &str) -> (Option<FormatGrouping>, &str) {
|
||||
fn parse_format_type(text: &str) -> (Option<FormatType>, &str) {
|
||||
let mut chars = text.chars();
|
||||
match chars.next() {
|
||||
Some('s') => (Some(FormatType::String), chars.as_str()),
|
||||
Some('b') => (Some(FormatType::Binary), chars.as_str()),
|
||||
Some('c') => (Some(FormatType::Character), chars.as_str()),
|
||||
Some('d') => (Some(FormatType::Decimal), chars.as_str()),
|
||||
|
||||
Reference in new issue
Block a user