Skip to content

Commit 3bcc031

Browse files
committed
alloc: AllocErr -> AllocError
Synchronize with recent nightly changes. For upstream commits, see: rust-lang/rust#77315 Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
1 parent 58c7085 commit 3bcc031

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/alloc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ unsafe impl core::alloc::AllocRef for Allocator {
128128
fn alloc(
129129
&self,
130130
layout: core::alloc::Layout,
131-
) -> Result<core::ptr::NonNull<[u8]>, core::alloc::AllocErr> {
131+
) -> Result<core::ptr::NonNull<[u8]>, core::alloc::AllocError> {
132132
// We forward the allocation request to `AllocatePool()`. This takes the memory-type and
133133
// size as argument, and places a pointer to the allocation in an output argument. Note
134134
// that UEFI guarantees 8-byte alignment (i.e., `POOL_ALIGNMENT`). To support higher
@@ -148,9 +148,9 @@ unsafe impl core::alloc::AllocRef for Allocator {
148148
// never a valid pointer). Furthermore, since the 0-page is usually unmapped and not
149149
// available for EFI_CONVENTIONAL_MEMORY, a NULL pointer cannot be a valid return pointer.
150150
// Therefore, we treat both a function failure as well as a NULL pointer the same and
151-
// return `AllocErr`.
151+
// return `AllocError`.
152152
if r.is_error() || ptr.is_null() {
153-
return Err(core::alloc::AllocErr);
153+
return Err(core::alloc::AllocError);
154154
}
155155

156156
unsafe {

0 commit comments

Comments
 (0)