compilation fix for no-std

Co-authored-by: Tobin C. Harding <me@tobin.cc>
This commit is contained in:
Michal Kucharczyk 2024-04-05 12:54:33 +02:00
parent b100bf3e22
commit 8653fb2775
No known key found for this signature in database
GPG Key ID: 79BC40F580782CC1
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,9 @@ pub extern crate serde;
use alloc::borrow::Cow;
use core::{fmt, str};
#[cfg(all(feature = "alloc", not(feature = "std")))]
use alloc::{string::ToString, vec::Vec};
/// We support a wide range of dependency versions for `rand` and `rand_core` and not
/// all versions play nicely together. These re-exports fix that.
#[cfg(all(feature = "rand", feature = "rand_core"))]