handle the case where 0 or >1 allocs are enabled

In particular this fixes `cargo build --all-features`.
This commit is contained in:
Charles Hall 2024-04-27 16:08:50 -07:00 committed by June
commit 3b05417246
5 changed files with 29 additions and 24 deletions

7
src/alloc/default.rs Normal file
View file

@ -0,0 +1,7 @@
//! Default allocator with no special features
/// Always returns the empty string
pub(crate) fn memory_stats() -> String { Default::default() }
/// Always returns the empty string
pub(crate) fn memory_usage() -> String { Default::default() }