diff --git a/Cargo.toml b/Cargo.toml index 81de617..78871a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "byte-unit" -version = "5.1.1" +version = "5.1.2" authors = ["Magic Len "] edition = "2021" rust-version = "1.69" diff --git a/src/bit/decimal.rs b/src/bit/decimal.rs index 142bafa..8426a77 100644 --- a/src/bit/decimal.rs +++ b/src/bit/decimal.rs @@ -123,13 +123,13 @@ impl Bit { #[inline] pub fn get_recoverable_unit( self, - allow_in_bits: bool, + allow_in_bytes: bool, mut precision: usize, ) -> (Decimal, Unit) { let bits_v = self.as_u128(); let bits_vd = Decimal::from(bits_v); - let a = if allow_in_bits { Unit::get_multiples() } else { Unit::get_multiples_bits() }; + let a = if allow_in_bytes { Unit::get_multiples() } else { Unit::get_multiples_bits() }; let mut i = a.len() - 1; if precision >= 28 {