Skip to content

Commit 961a017

Browse files
vireshkroypat
authored andcommitted
mmap_xen: Update to bitflags 2.4.0
Clippy gives this warning currently: error: &-masking with zero --> src/mmap_xen.rs:433:1 | 433 | / bitflags! { 434 | | /// Flags for the Xen mmap message. 435 | | pub struct MmapXenFlags: u32 { 436 | | /// Standard Unix memory mapping. ... | 446 | | } 447 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask = note: `#[deny(clippy::bad_bit_mask)]` on by default = note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) Fix it by switching to a newer version of bitflags. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent a6bcb43 commit 961a017

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ xen = ["backend-mmap", "bitflags", "vmm-sys-util"]
2121
[dependencies]
2222
libc = "0.2.39"
2323
arc-swap = { version = "1.0.0", optional = true }
24-
bitflags = { version = "1.0", optional = true }
24+
bitflags = { version = "2.4.0", optional = true }
2525
thiserror = "1.0.40"
2626
vmm-sys-util = { version = "0.11.0", optional = true }
2727

src/mmap_xen.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ impl Drop for MmapUnix {
432432
// Bit mask for the vhost-user xen mmap message.
433433
bitflags! {
434434
/// Flags for the Xen mmap message.
435+
#[derive(Copy, Clone, Debug)]
435436
pub struct MmapXenFlags: u32 {
436437
/// Standard Unix memory mapping.
437438
const UNIX = 0x0;

0 commit comments

Comments
 (0)