Skip to content

Commit 80881ac

Browse files
committed
chore: expand debug impl
1 parent ee144fa commit 80881ac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl Display for ByteSize {
243243

244244
impl Debug for ByteSize {
245245
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
246-
write!(f, "{}", self)
246+
<Self as Display>::fmt(self, f)
247247
}
248248
}
249249

src/parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ mod tests {
236236

237237
assert_eq!(parse(&format!("{}", parse("128GB"))), 128 * Unit::GigaByte);
238238
assert_eq!(
239-
parse(&to_string_format(parse("128.000 GiB"), crate::Format::IEC,)),
240-
128 * Unit::GibiByte
239+
parse(&to_string_format(parse("128.000 GiB"), crate::Format::IEC)),
240+
128 * Unit::GibiByte,
241241
);
242242
}
243243
}

0 commit comments

Comments
 (0)