Skip to content

Commit 58c7085

Browse files
al3xtjamesdvdhrm
authored andcommitted
alloc: align with AllocRef trait changes in nightly
Needed since rust-lang/rust#76993 Signed-off-by: Alex James <[email protected]>
1 parent 0cac105 commit 58c7085

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/alloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl Allocator {
126126

127127
unsafe impl core::alloc::AllocRef for Allocator {
128128
fn alloc(
129-
&mut self,
129+
&self,
130130
layout: core::alloc::Layout,
131131
) -> Result<core::ptr::NonNull<[u8]>, core::alloc::AllocErr> {
132132
// We forward the allocation request to `AllocatePool()`. This takes the memory-type and
@@ -165,7 +165,7 @@ unsafe impl core::alloc::AllocRef for Allocator {
165165
).unwrap())
166166
}
167167

168-
unsafe fn dealloc(&mut self, ptr: core::ptr::NonNull<u8>, layout: core::alloc::Layout) {
168+
unsafe fn dealloc(&self, ptr: core::ptr::NonNull<u8>, layout: core::alloc::Layout) {
169169
if layout.size() != 0 {
170170
// The spec allows returning errors from `FreePool()`. However, it
171171
// must serve any valid requests. Only `INVALID_PARAMETER` is

0 commit comments

Comments
 (0)