Description: Enable std for tests while main library is no_std Last-Update: 2024-10-16 --- a/src/lib.rs +++ b/src/lib.rs @@ -3212,3 +3212,7 @@ #[cfg(test)] +#[macro_use] +extern crate std; +#[cfg(test)] mod tests { + use std::prelude::rust_2018::*; // inline with package.edition = "2018" use super::*; --- a/Cargo.toml +++ b/Cargo.toml @@ -34,2 +34,5 @@ default-features = false +# Debian: enable its alloc feature for tests. +[dev-dependencies.encoding_rs] +version = "0.8"