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 {
9595 space : bool ,
9696 hash : bool ,
9797 zero : bool ,
98+ quote : bool ,
9899}
99100
100101impl Flags {
@@ -108,6 +109,11 @@ impl Flags {
108109 b' ' => flags. space = true ,
109110 b'#' => flags. hash = true ,
110111 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+ }
111117 _ => break ,
112118 }
113119 * index += 1 ;
@@ -181,7 +187,7 @@ impl Spec {
181187 }
182188 }
183189 b's' => {
184- if flags. zero || flags. hash {
190+ if flags. zero || flags. hash || flags . quote {
185191 return Err ( & start[ ..index] ) ;
186192 }
187193 Self :: String {
You can’t perform that action at this time.
0 commit comments