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) } }