File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,14 @@ const UNITS_IEC: &str = "KMGTPE";
6565
6666/// SI (decimal) units.
6767///
68- ///
6968/// See <https://en.wikipedia.org/wiki/Kilobyte>.
7069const UNITS_SI : & str = "kMGTPE" ;
7170
7271/// `ln(1024) ~= 6.931`
73- const LN_KIB : f64 = 6.931471806 ;
72+ const LN_KIB : f64 = 6.931_471_805_599_453 ;
7473
7574/// `ln(1000) ~= 6.908`
76- const LN_KB : f64 = 6.907755279 ;
75+ const LN_KB : f64 = 6.907_755_278_982_137 ;
7776
7877#[ derive( Debug , Clone , Default ) ]
7978pub enum Format {
@@ -471,7 +470,7 @@ mod tests {
471470 assert_to_string ( "293.9 KiB" , ByteSize :: kb ( 301 ) , Format :: IEC ) ;
472471 assert_to_string ( "301.0 kB" , ByteSize :: kb ( 301 ) , Format :: SI ) ;
473472
474- assert_to_string ( "1024 .0 KiB " , ByteSize :: mib ( 1 ) , Format :: IEC ) ;
473+ assert_to_string ( "1 .0 MiB " , ByteSize :: mib ( 1 ) , Format :: IEC ) ;
475474 assert_to_string ( "1.0 MB" , ByteSize :: mib ( 1 ) , Format :: SI ) ;
476475
477476 assert_to_string ( "1.9 GiB" , ByteSize :: mib ( 1907 ) , Format :: IEC ) ;
You can’t perform that action at this time.
0 commit comments