Skip to content

Commit 55fc77a

Browse files
committed
Add feature no-allocator to ink_allocator
1 parent 69f959f commit 55fc77a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/allocator/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ quickcheck_macros = "1"
2525
default = ["std"]
2626
std = []
2727
ink-fuzz-tests = ["std"]
28+
no-allocator = []

crates/allocator/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#![cfg_attr(not(feature = "std"), no_std)]
2222
#![cfg_attr(not(feature = "std"), feature(alloc_error_handler))]
2323

24-
#[cfg(not(feature = "std"))]
24+
#[cfg(not(any(feature = "std", feature = "no-allocator")))]
2525
#[global_allocator]
2626
static mut ALLOC: bump::BumpAllocator = bump::BumpAllocator {};
2727

0 commit comments

Comments
 (0)