Skip to content

Commit

Permalink
chore: allow unexpected-cfgs to address clippy error
Browse files Browse the repository at this point in the history
Add  to allow unexpected-cfgs on async_io feature

Signed-off-by: Yang Kaiyong <yangkaiyong.yky@antgroup.com>
  • Loading branch information
Yang Kaiyong committed Jan 23, 2025
1 parent 5603c65 commit 18d1da7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'] }
]
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/transport/virtiofs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down

0 comments on commit 18d1da7

Please sign in to comment.