From 18d1da780ddc4867be1d730f40600330a0b8edd7 Mon Sep 17 00:00:00 2001 From: Yang Kaiyong Date: Thu, 23 Jan 2025 17:34:35 +0800 Subject: [PATCH] chore: allow unexpected-cfgs to address clippy error Add to allow unexpected-cfgs on async_io feature Signed-off-by: Yang Kaiyong --- Cargo.toml | 5 +---- Makefile | 8 ++++---- src/transport/virtiofs/mod.rs | 1 - 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3e7bb7c6..6376106f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,7 +73,4 @@ targets = [ "x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "aarch64-apple-darwin", -] - -[lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(testff)'] } \ No newline at end of file +] \ No newline at end of file diff --git a/Makefile b/Makefile index 07087de1..5b13af3b 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,10 @@ build: check: build ${CARGO} fmt -- --check - ${CARGO} clippy ${TARGET} --features="fusedev" --no-default-features -- -Dwarnings - ${CARGO} clippy ${TARGET} --features="virtiofs" --no-default-features -- -Dwarnings - ${CARGO} clippy ${TARGET} --features="vhost-user-fs" --no-default-features -- -Dwarnings - ${CARGO} clippy ${TARGET} --features="fusedev,virtiofs" --no-default-features -- -Dwarnings + ${CARGO} clippy ${TARGET} --features="fusedev" --no-default-features -- -Dwarnings -A unexpected-cfgs + ${CARGO} clippy ${TARGET} --features="virtiofs" --no-default-features -- -Dwarnings -A unexpected-cfgs + ${CARGO} clippy ${TARGET} --features="vhost-user-fs" --no-default-features -- -Dwarnings -A unexpected-cfgs + ${CARGO} clippy ${TARGET} --features="fusedev,virtiofs" --no-default-features -- -Dwarnings -A unexpected-cfgs test: ${CARGO} test ${TARGET} --features="fusedev" --no-default-features -- --nocapture --skip integration diff --git a/src/transport/virtiofs/mod.rs b/src/transport/virtiofs/mod.rs index a9cd2669..81d189dc 100644 --- a/src/transport/virtiofs/mod.rs +++ b/src/transport/virtiofs/mod.rs @@ -388,7 +388,6 @@ mod async_io { /// Disabled since vm-virtio doesn't export any DescriptorChain constructors. /// Should re-enable once it does. -#[allow(unexpected_cfgs)] #[cfg(testff)] mod tests { use super::*;