Skip to content

Commit

Permalink
Fixes bitflags 2.0 derives.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathansizemore committed Jul 3, 2023
1 parent d53419e commit d3a2304
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
extern crate bitflags;
extern crate libc;

use std::fmt::{Formatter, Debug, Result};
use std::fmt::{Debug, Formatter, Result};
use std::io::{self, Error};
use std::os::unix::io::RawFd;

Expand All @@ -24,7 +24,8 @@ pub enum ControlOptions {
}

bitflags! {
#[derive(Debug)]

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Events: u32 {
/// Sets the Edge Triggered behavior for the associated file descriptor.
///
Expand Down Expand Up @@ -125,7 +126,7 @@ impl Debug for Event {
let data = self.data;
f.debug_struct("Event")
.field("events", &Events::from_bits_retain(self.events)) // Retain so we can see erroneously set bits too
.field("data", &data)
.field("data", &data)
.finish()
}
}
Expand Down

0 comments on commit d3a2304

Please sign in to comment.