Skip to content

Commit

Permalink
Update to bitflags 2
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jan 6, 2024
1 parent d653e7e commit 2288964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rstest = "0.13"
log = "0.4"
cfg-if = "1"
rustversion = "1"
bitflags = "1"
bitflags = "2"

[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]
libc = ">=0.2.123"
Expand Down
8 changes: 1 addition & 7 deletions src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ impl ScheduleParams {
bitflags::bitflags! {
/// Flags for controlling Deadline scheduling behavior.
#[repr(transparent)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DeadlineFlags: u64 {
/// Children created by [`libc::fork`] will not inherit privileged
/// scheduling policies.
Expand All @@ -141,13 +142,6 @@ bitflags::bitflags! {
}
}

#[cfg(any(target_os = "linux", target_os = "android"))]
impl Default for DeadlineFlags {
fn default() -> Self {
Self::empty()
}
}

/// Returns scheduling attributes for the current thread.
#[cfg(any(target_os = "linux", target_os = "android"))]
pub fn get_thread_scheduling_attributes() -> Result<SchedAttr, Error> {
Expand Down

0 comments on commit 2288964

Please sign in to comment.