Skip to content

Commit

Permalink
Merge pull request #974 from nicholasbishop/bishop-remove-nonnull
Browse files Browse the repository at this point in the history
uefi-services: Remove NonNull wrapper from system_table
  • Loading branch information
phip1611 authored Oct 26, 2023
2 parents 3ae65f6 + 2e58314 commit 6240743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

## uefi-services - [Unreleased]

### Changed
- `uefi_services::system_table` now returns `SystemTable<Boot>` directly, rather
than wrapped in a `NonNull` pointer.

## uefi - 0.25.0 (2023-10-10)

### Changed
Expand Down
4 changes: 2 additions & 2 deletions uefi-services/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ static mut LOGGER: Option<uefi::logger::Logger> = None;
///
/// The returned pointer is only valid until boot services are exited.
#[must_use]
pub fn system_table() -> NonNull<SystemTable<Boot>> {
pub fn system_table() -> SystemTable<Boot> {
unsafe {
let table_ref = SYSTEM_TABLE
.as_ref()
.expect("The system table handle is not available");
NonNull::new(table_ref as *const _ as *mut _).unwrap()
table_ref.unsafe_clone()
}
}

Expand Down

0 comments on commit 6240743

Please sign in to comment.