diff options
Diffstat (limited to 'src/sys/timerfd.rs')
-rw-r--r-- | src/sys/timerfd.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sys/timerfd.rs b/src/sys/timerfd.rs index 44915be1..5d87b7c2 100644 --- a/src/sys/timerfd.rs +++ b/src/sys/timerfd.rs @@ -58,6 +58,7 @@ libc_enum! { /// The type of the clock used to mark the progress of the timer. For more /// details on each kind of clock, please refer to [timerfd_create(2)](https://man7.org/linux/man-pages/man2/timerfd_create.2.html). #[repr(i32)] + #[non_exhaustive] pub enum ClockId { CLOCK_REALTIME, CLOCK_MONOTONIC, @@ -87,7 +88,7 @@ bitflags! { struct TimerSpec(libc::itimerspec); impl TimerSpec { - pub fn none() -> Self { + pub const fn none() -> Self { Self(libc::itimerspec { it_interval: libc::timespec { tv_sec: 0, |