This repository was archived by the owner on Feb 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " malachite-bigint"
3- version = " 0.2.1 "
3+ version = " 0.2.2 "
44authors = [" Steve Shi <shikangzhi@gmail.com>" ]
55edition = " 2021"
66license = " LGPL-3.0-only"
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ impl Neg for Sign {
7979 From ,
8080 Into ,
8181) ]
82- #[ display( "{}" , " self.0" ) ]
82+ #[ display( "{}" , self . 0 ) ]
8383#[ into( owned, ref, ref_mut) ]
8484pub struct BigInt ( Integer ) ;
8585
@@ -680,3 +680,9 @@ fn test_to_signed_bytes() {
680680 let i2 = BigInt :: from_signed_bytes_le ( & b) ;
681681 assert_eq ! ( i, i2) ;
682682}
683+
684+ #[ test]
685+ fn test_display_bigint ( ) {
686+ let n = BigInt :: from_str ( "1234567890" ) . unwrap ( ) ;
687+ assert_eq ! ( format!( "{}" , n) , "1234567890" ) ;
688+ }
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ impl_primitive_convert!(BigUint, f64);
5454 From ,
5555 Into ,
5656) ]
57- #[ display( "{}" , " self.0" ) ]
57+ #[ display( "{}" , self . 0 ) ]
5858#[ into( owned, ref, ref_mut) ]
5959pub struct BigUint ( pub ( crate ) Natural ) ;
6060
@@ -487,3 +487,9 @@ impl BigUint {
487487fn test_from_string_base ( ) {
488488 assert ! ( BigUint :: from_str_radix( "1000000000000000111111100112abcdefg" , 16 ) . is_err( ) ) ;
489489}
490+
491+ #[ test]
492+ fn test_display_biguint ( ) {
493+ let x = BigUint :: from_str_radix ( "1234567890" , 10 ) . unwrap ( ) ;
494+ assert_eq ! ( format!( "{}" , x) , "1234567890" ) ;
495+ }
You can’t perform that action at this time.
0 commit comments