Skip to content

Commit aa2d197

Browse files
authored
Update to bitflags 2 (#34)
1 parent 3da3bc9 commit aa2d197

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rstest = "0.13"
1818
log = "0.4"
1919
cfg-if = "1"
2020
rustversion = "1"
21-
bitflags = "1"
21+
bitflags = "2"
2222

2323
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "ios", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies]
2424
libc = ">=0.2.123"

src/unix.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ impl ScheduleParams {
128128
bitflags::bitflags! {
129129
/// Flags for controlling Deadline scheduling behavior.
130130
#[repr(transparent)]
131+
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
131132
pub struct DeadlineFlags: u64 {
132133
/// Children created by [`libc::fork`] will not inherit privileged
133134
/// scheduling policies.
@@ -141,13 +142,6 @@ bitflags::bitflags! {
141142
}
142143
}
143144

144-
#[cfg(any(target_os = "linux", target_os = "android"))]
145-
impl Default for DeadlineFlags {
146-
fn default() -> Self {
147-
Self::empty()
148-
}
149-
}
150-
151145
/// Returns scheduling attributes for the current thread.
152146
#[cfg(any(target_os = "linux", target_os = "android"))]
153147
pub fn get_thread_scheduling_attributes() -> Result<SchedAttr, Error> {

0 commit comments

Comments
 (0)