File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,9 @@ impl fmt::LowerHex for BigInt {
173173
174174impl fmt:: UpperHex for BigInt {
175175 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
176- f . pad_integral ( ! self . is_negative ( ) ,
177- "0x" ,
178- & self . data . to_str_radix ( 16 ) . to_ascii_uppercase ( ) )
176+ let mut s = self . data . to_str_radix ( 16 ) ;
177+ s . make_ascii_uppercase ( ) ;
178+ f . pad_integral ( ! self . is_negative ( ) , "0x" , & s )
179179 }
180180}
181181
Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ impl fmt::LowerHex for BigUint {
9393
9494impl fmt:: UpperHex for BigUint {
9595 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
96- f. pad_integral ( true , "0x" , & self . to_str_radix ( 16 ) . to_ascii_uppercase ( ) )
96+ let mut s = self . to_str_radix ( 16 ) ;
97+ s. make_ascii_uppercase ( ) ;
98+ f. pad_integral ( true , "0x" , & s)
9799 }
98100}
99101
You can’t perform that action at this time.
0 commit comments