Skip to content

Commit

Permalink
chore: expand debug impl
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Feb 10, 2025
1 parent ee144fa commit 80881ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl Display for ByteSize {

impl Debug for ByteSize {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(f, "{}", self)
<Self as Display>::fmt(self, f)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ mod tests {

assert_eq!(parse(&format!("{}", parse("128GB"))), 128 * Unit::GigaByte);
assert_eq!(
parse(&to_string_format(parse("128.000 GiB"), crate::Format::IEC,)),
128 * Unit::GibiByte
parse(&to_string_format(parse("128.000 GiB"), crate::Format::IEC)),
128 * Unit::GibiByte,
);
}
}

0 comments on commit 80881ac

Please sign in to comment.