From 567c856fb621c760d0da0566e547a854489d9c5d Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 25 Jul 2024 14:03:25 -0400 Subject: [PATCH 1/2] Cargo.toml: add devicemapper versions to unexpected_cfgs Signed-off-by: Bryan Gurney --- Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index e5c4c91e..6bb3b5e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,3 +44,12 @@ path = "./devicemapper-rs-sys" [build-dependencies] semver = "1.0.0" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(devicemapper41supported)', + 'cfg(devicemapper42supported)', + 'cfg(devicemapper437supported)', + 'cfg(devicemapper441supported)', + 'cfg(devicemapper46supported)' +] } From 7113e7716c1d81326711fdd03ad48b67671e48c7 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 25 Jul 2024 14:07:12 -0400 Subject: [PATCH 2/2] Re-indent comments for event polling Signed-off-by: Bryan Gurney --- src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c1919d0f..0bd4366d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,18 +49,18 @@ //! //! 1. Create a `DM`. //! 2. Call `DM::list_devices()` and track the `event_nr`s for any DM devices -//! of interest. +//! of interest. //! 3. `poll()` on the `DM`'s file descriptor, obtained by calling -//! `DM::file().as_raw_fd()`. +//! `DM::file().as_raw_fd()`. //! 4. If the fd indicates activity, first clear the event by calling -//! `DM::arm_poll()`. This must be done before event processing to ensure -//! events are not missed. +//! `DM::arm_poll()`. This must be done before event processing to ensure +//! events are not missed. //! 5. Process events. Call `DM::list_devices()` again, and compare `event_nr` -//! returned by the more recent call with `event_nr` values from the earlier -//! call. If `event_nr` differs, an event has occurred on that specific -//! device. Handle the event(s). Update the list of last-seen `event_nr`s. +//! returned by the more recent call with `event_nr` values from the earlier +//! call. If `event_nr` differs, an event has occurred on that specific +//! device. Handle the event(s). Update the list of last-seen `event_nr`s. //! 6. Optionally loop and re-invoke `poll()` on the fd to wait for more -//! events. +//! events. #![allow(clippy::doc_markdown)] #![warn(missing_docs)]