-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils/clock: Use
rustix
, without unsafe
; infallible
Rustix's `lock_gettime` does not return an error, and notes it is infallible, while `clock_gettime_dynamic` can handle some additional clocks that may result in an error. I don't think the clock helper in Smithay needs to handle any of those, so returning a `Result` in `new` is unneeded. This also uses an associated const for `ClockSource::ID`, so the clock id doesn't need to be stored a runtime when it's already expressed in the type. Const generics would be suitable, but don't work with enums yet.
- Loading branch information
Showing
4 changed files
with
20 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters