Skip to content

Commit

Permalink
Merge pull request #928 from bgurney-rh/rust-1.80
Browse files Browse the repository at this point in the history
Fix clippy lints for Rust 1.80
  • Loading branch information
mulkieran authored Jul 25, 2024
2 parents f0cb5f6 + 7113e77 commit ed714e9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
] }
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit ed714e9

Please sign in to comment.