bytesize
bytesize copied to clipboard
Unit measurements shouldn't convert from XiB to XB
let block_sectors = 1953458176;
let size = ByteSize::kib(block_sectors / 2);
println!("{}", size);
Expected Output:
931.48 GiB
Actual Output:
1000.2 GB
Your request makes sense for me. In terms of implementation, we will be able to keep the unit as a kind of Enum and use the Enum type to represent the original input unit. But, it will cause the different behavior of the current library. So, let me think about more if there is a better option.