Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uefi: Remove some uses of MaybeUninit in BootServices
While `MaybeUninit` is useful to avoid unnecessarily initializing large buffers, it's not needed for small values like single pointers and integers. For `Event`, `Handle`, and `ProtocolSearchKey`, which internally contain a `NonNull` pointer, we can wrap them in an `Option` and still have the same layout as a raw pointer. The initial value can then be `None` rather than `MaybeUninit`. This has the nice side effect of removing a little bit of `unsafe` code.
- Loading branch information
1 parent
d15b7de
commit 58ed2cb
Showing
1 changed file
with
40 additions
and
37 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