Skip to content

Commit 0293407

Browse files
committed
fix: rust-2018-idioms
1 parent c84ba20 commit 0293407

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ mmio = []
3131
nightly = []
3232
pci = ["dep:pci_types"]
3333
zerocopy = ["dep:zerocopy", "dep:zerocopy-derive", "endian-num/zerocopy"]
34+
35+
[lints.rust]
36+
rust_2018_idioms = "warn"

src/bitflags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ macro_rules! virtio_bitflags {
8484
macro_rules! impl_fmt {
8585
($Trait:ident for $SelfT:ty) => {
8686
impl ::core::fmt::$Trait for $SelfT {
87-
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
87+
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8888
self.0.fmt(f)
8989
}
9090
}

0 commit comments

Comments
 (0)