File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ macro_rules! impl_Display {
211
211
// convert the negative num to positive by summing 1 to it's 2 complement
212
212
( !self . $conv_fn( ) ) . wrapping_add( 1 )
213
213
} ;
214
- let mut buf: [ u8 ; 40 ] = unsafe { mem:: uninitialized( ) } ;
214
+ let mut buf: [ u8 ; 39 ] = unsafe { mem:: uninitialized( ) } ;
215
215
let mut curr = buf. len( ) as isize ;
216
216
let buf_ptr = buf. as_mut_ptr( ) ;
217
217
let lut_ptr = DEC_DIGITS_LUT . as_ptr( ) ;
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ fn main() {
59
59
assert_eq ! ( "20000000000000000000000" , format!( "{:o}" , j) ) ;
60
60
assert_eq ! ( "10000000000000000000000000000000000000000000000000000000000000000000" ,
61
61
format!( "{:b}" , j) ) ;
62
+ assert_eq ! ( "340282366920938463463374607431768211455" ,
63
+ format!( "{}" , u128 :: max_value( ) ) ) ;
62
64
assert_eq ! ( "147573952589676412928" , format!( "{:?}" , j) ) ;
63
65
// common traits
64
66
x. clone ( ) ;
You can’t perform that action at this time.
0 commit comments