File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/uucore/src/lib/features/format Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ struct Flags {
95
95
space : bool ,
96
96
hash : bool ,
97
97
zero : bool ,
98
+ quote : bool ,
98
99
}
99
100
100
101
impl Flags {
@@ -108,6 +109,11 @@ impl Flags {
108
109
b' ' => flags. space = true ,
109
110
b'#' => flags. hash = true ,
110
111
b'0' => flags. zero = true ,
112
+ b'\'' => {
113
+ // the thousands separator is printed with numbers using the ' flag, but
114
+ // this is a no-op in the "C" locale. We only save this flag for reporting errors
115
+ flags. quote = true ;
116
+ }
111
117
_ => break ,
112
118
}
113
119
* index += 1 ;
@@ -181,7 +187,7 @@ impl Spec {
181
187
}
182
188
}
183
189
b's' => {
184
- if flags. zero || flags. hash {
190
+ if flags. zero || flags. hash || flags . quote {
185
191
return Err ( & start[ ..index] ) ;
186
192
}
187
193
Self :: String {
You can’t perform that action at this time.
0 commit comments