diff --git a/flatten/src/lib.rs b/flatten/src/lib.rs index dca6e389..6d273302 100644 --- a/flatten/src/lib.rs +++ b/flatten/src/lib.rs @@ -49,9 +49,10 @@ value is stringified and concatenated together. - **tuples**: tuple values are passed through directly. */ -#![cfg_attr(not(feature = "std"), no_std)] +#![no_std] #![deny(missing_docs)] +#[cfg(any(test, feature = "alloc"))] extern crate alloc; mod flattener; diff --git a/flatten/src/map.rs b/flatten/src/map.rs index 187ac0e9..a372b603 100644 --- a/flatten/src/map.rs +++ b/flatten/src/map.rs @@ -361,6 +361,8 @@ mod tests { use super::*; + use alloc::borrow::ToOwned; + struct Outer { a: i32, // #[sval(flatten)]