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)' +] } 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)]