Skip to content

Use NonNull in struct Event, similar to struct Handle #477

@nicholasbishop

Description

@nicholasbishop

In #309, the Handle type was changed from containing just a raw pointer to NonNull<c_void>, which has the nice advantage that you can then use Option<Handle> when you want a nullable Handle, and this is FFI-safe.

As was mentioned in #309 (comment), it would make sense to do this for the Event type too -- there are times when it needs to be nullable such as the token structures in BlockIO2 and DiskIO2.

Relevant code: https://github.com/rust-osdev/uefi-rs/blob/main/src/data_types/mod.rs#L42

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions