Skip to content

Commit e4e4447

Browse files
committed
fix parameter name
1 parent e22ff8b commit e4e4447

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "byte-unit"
3-
version = "5.1.1"
3+
version = "5.1.2"
44
authors = ["Magic Len <[email protected]>"]
55
edition = "2021"
66
rust-version = "1.69"

src/bit/decimal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ impl Bit {
123123
#[inline]
124124
pub fn get_recoverable_unit(
125125
self,
126-
allow_in_bits: bool,
126+
allow_in_bytes: bool,
127127
mut precision: usize,
128128
) -> (Decimal, Unit) {
129129
let bits_v = self.as_u128();
130130
let bits_vd = Decimal::from(bits_v);
131131

132-
let a = if allow_in_bits { Unit::get_multiples() } else { Unit::get_multiples_bits() };
132+
let a = if allow_in_bytes { Unit::get_multiples() } else { Unit::get_multiples_bits() };
133133
let mut i = a.len() - 1;
134134

135135
if precision >= 28 {

0 commit comments

Comments
 (0)