make the allocators clonable

This commit is contained in:
Corwin 2022-08-04 19:26:55 +01:00
parent 2e97fb2b24
commit e3ac5de377

View file

@ -78,6 +78,7 @@ macro_rules! impl_zst_allocator {
/// ); /// );
/// # } /// # }
/// ``` /// ```
#[derive(Clone)]
pub struct ExternalAllocator; pub struct ExternalAllocator;
impl_zst_allocator!(ExternalAllocator, GLOBAL_ALLOC); impl_zst_allocator!(ExternalAllocator, GLOBAL_ALLOC);
@ -102,6 +103,7 @@ impl_zst_allocator!(ExternalAllocator, GLOBAL_ALLOC);
/// ); /// );
/// # } /// # }
/// ``` /// ```
#[derive(Clone)]
pub struct InternalAllocator; pub struct InternalAllocator;
impl_zst_allocator!(InternalAllocator, __IWRAM_ALLOC); impl_zst_allocator!(InternalAllocator, __IWRAM_ALLOC);