Skip to content

Commit 22366a3

Browse files
committed
chore: enforce usual rust lints
1 parent c8ffeb4 commit 22366a3

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
@@ -29,4 +29,7 @@ serde_json = "1"
2929
toml = "0.8"
3030

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

src/lib.rs

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

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

262262
impl Debug for ByteSize {
263-
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
263+
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
264264
<Self as Display>::fmt(self, f)
265265
}
266266
}

0 commit comments

Comments
 (0)