From 3bcc031a5fac03377294f99ca4c735d8c9e529f9 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Fri, 2 Oct 2020 10:03:25 +0200 Subject: [PATCH] alloc: AllocErr -> AllocError Synchronize with recent nightly changes. For upstream commits, see: https://github.com/rust-lang/rust/pull/77315 Signed-off-by: David Rheinsberg --- src/alloc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/alloc.rs b/src/alloc.rs index 0e99678..bdf0629 100644 --- a/src/alloc.rs +++ b/src/alloc.rs @@ -128,7 +128,7 @@ unsafe impl core::alloc::AllocRef for Allocator { fn alloc( &self, layout: core::alloc::Layout, - ) -> Result, core::alloc::AllocErr> { + ) -> Result, core::alloc::AllocError> { // We forward the allocation request to `AllocatePool()`. This takes the memory-type and // size as argument, and places a pointer to the allocation in an output argument. Note // that UEFI guarantees 8-byte alignment (i.e., `POOL_ALIGNMENT`). To support higher @@ -148,9 +148,9 @@ unsafe impl core::alloc::AllocRef for Allocator { // never a valid pointer). Furthermore, since the 0-page is usually unmapped and not // available for EFI_CONVENTIONAL_MEMORY, a NULL pointer cannot be a valid return pointer. // Therefore, we treat both a function failure as well as a NULL pointer the same and - // return `AllocErr`. + // return `AllocError`. if r.is_error() || ptr.is_null() { - return Err(core::alloc::AllocErr); + return Err(core::alloc::AllocError); } unsafe {