-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refac: use
enum_from_bits!
where appropriate
Depends on #450. This branch replaces some boilerplate implementations of `FromBits` for enum types with the `enum_from_bits!` macro added to `mycelium-bitfield` in #450. I didn't touch a couple manual `FromBits` implementations. Some parts of `mycelium-pci` manually implement `FromBits` in order to return a custom error type, so I left those alone. A few places in `maitake` use manual implementations for enums that cover all possible 2-bit bit patterns, so that the error arm can be `unreachable_unchecked!`. I didn't touch those either, since the perf delta may actually matter in those cases.
- Loading branch information
Showing
6 changed files
with
143 additions
and
395 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
Oops, something went wrong.