Skip to content

Commit

Permalink
chore: enforce usual rust lints (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede authored Feb 13, 2025
1 parent b4c6916 commit 0dcc0ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ serde_json = "1"
toml = "0.8"

[lints.rust]
missing-docs = "warn"
rust-2018-idioms = { level = "deny" }
future-incompatible = { level = "deny" }
nonstandard-style = { level = "deny" }
missing-docs = { level = "warn" }
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ pub fn to_string_format(bytes: u64, format: Format) -> String {
}

impl Display for ByteSize {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.pad(&to_string_format(self.0, Format::IEC))
}
}

impl Debug for ByteSize {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
<Self as Display>::fmt(self, f)
}
}
Expand Down

0 comments on commit 0dcc0ac

Please sign in to comment.