Skip to content

Commit 8653fb2

Browse files
compilation fix for no-std
Co-authored-by: Tobin C. Harding <me@tobin.cc>
1 parent b100bf3 commit 8653fb2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ pub extern crate serde;
4848
use alloc::borrow::Cow;
4949
use core::{fmt, str};
5050

51+
#[cfg(all(feature = "alloc", not(feature = "std")))]
52+
use alloc::{string::ToString, vec::Vec};
53+
5154
/// We support a wide range of dependency versions for `rand` and `rand_core` and not
5255
/// all versions play nicely together. These re-exports fix that.
5356
#[cfg(all(feature = "rand", feature = "rand_core"))]

0 commit comments

Comments
 (0)