Skip to content

Commit 969b4e9

Browse files
committed
mem: add sane default parameter
This is also the default for the types in the `alloc` crate
1 parent fcfe676 commit 969b4e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

uefi/src/mem/util.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use core::slice;
99

1010
#[cfg(not(feature = "unstable"))]
1111
use ::alloc::alloc::{alloc, dealloc};
12+
#[cfg(feature = "unstable")]
13+
use alloc::alloc::Global;
1214

1315
#[cfg(feature = "unstable")]
1416
use {core::alloc::Allocator, core::ptr::NonNull};
@@ -39,7 +41,7 @@ pub(crate) fn make_boxed<
3941
// The UEFI data structure.
4042
Data: Align + ?Sized + Debug + 'a,
4143
F: FnMut(&'a mut [u8]) -> Result<&'a mut Data, Option<usize>>,
42-
#[cfg(feature = "unstable")] A: Allocator,
44+
#[cfg(feature = "unstable")] A: Allocator = Global,
4345
>(
4446
// A function to read the UEFI data structure into a provided buffer.
4547
mut fetch_data_fn: F,

0 commit comments

Comments
 (0)