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