From 42e787d219b8ae42b9039c4fae745a3d260ba482 Mon Sep 17 00:00:00 2001 From: Alex James Date: Wed, 30 Sep 2020 19:53:47 -0500 Subject: [PATCH] alloc: align with AllocRef trait changes in nightly Needed since https://github.com/rust-lang/rust/pull/76993 Signed-off-by: Alex James --- src/alloc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alloc.rs b/src/alloc.rs index 3b33873..0e99678 100644 --- a/src/alloc.rs +++ b/src/alloc.rs @@ -126,7 +126,7 @@ impl Allocator { unsafe impl core::alloc::AllocRef for Allocator { fn alloc( - &mut self, + &self, layout: core::alloc::Layout, ) -> Result, core::alloc::AllocErr> { // We forward the allocation request to `AllocatePool()`. This takes the memory-type and @@ -165,7 +165,7 @@ unsafe impl core::alloc::AllocRef for Allocator { ).unwrap()) } - unsafe fn dealloc(&mut self, ptr: core::ptr::NonNull, layout: core::alloc::Layout) { + unsafe fn dealloc(&self, ptr: core::ptr::NonNull, layout: core::alloc::Layout) { if layout.size() != 0 { // The spec allows returning errors from `FreePool()`. However, it // must serve any valid requests. Only `INVALID_PARAMETER` is