Skip to content

Commit

Permalink
compilation fix for no-std
Browse files Browse the repository at this point in the history
Co-authored-by: Tobin C. Harding <[email protected]>
  • Loading branch information
michalkucharczyk and tcharding committed Apr 8, 2024
1 parent b100bf3 commit 8653fb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))]
Expand Down

0 comments on commit 8653fb2

Please sign in to comment.