From c6609c47dfeafbc8c9fcd1e4075e60b42167316b Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 12 Feb 2025 02:12:20 +0000 Subject: [PATCH] chore: enforce usual rust lints --- Cargo.toml | 5 ++++- src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d3812437..00a2e8e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/src/lib.rs b/src/lib.rs index d7502010..4e0e0c1e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 { ::fmt(self, f) } }