Skip to content

Commit 0dcc0ac

Browse files
authored
chore: enforce usual rust lints (#75)
1 parent b4c6916 commit 0dcc0ac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ serde_json = "1"
3030
toml = "0.8"
3131

3232
[lints.rust]
33-
missing-docs = "warn"
33+
rust-2018-idioms = { level = "deny" }
34+
future-incompatible = { level = "deny" }
35+
nonstandard-style = { level = "deny" }
36+
missing-docs = { level = "warn" }

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,13 @@ pub fn to_string_format(bytes: u64, format: Format) -> String {
268268
}
269269

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

276276
impl Debug for ByteSize {
277-
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
277+
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
278278
<Self as Display>::fmt(self, f)
279279
}
280280
}

0 commit comments

Comments
 (0)