Fix imports on features +alloc +raw_value -std

Closes #850.
This commit is contained in:
David Tolnay 2022-01-22 05:00:31 -08:00
parent a22b686f49
commit 8ecd48308a
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 6 additions and 0 deletions

View File

@ -49,6 +49,7 @@ jobs:
- run: cargo check --features raw_value
- run: cargo check --features unbounded_depth
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value
- run: cargo check --features preserve_order
if: matrix.rust != '1.45.0' && matrix.rust != '1.40.0' && matrix.rust != '1.38.0' && matrix.rust != '1.36.0'
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,preserve_order

View File

@ -1,4 +1,7 @@
use crate::error::Error;
use alloc::borrow::ToOwned;
use alloc::boxed::Box;
use alloc::string::String;
use core::fmt::{self, Debug, Display};
use core::mem;
use serde::de::value::BorrowedStrDeserializer;

View File

@ -4,6 +4,8 @@ use crate::number::Number;
use crate::value::Value;
use alloc::borrow::{Cow, ToOwned};
use alloc::string::String;
#[cfg(feature = "raw_value")]
use alloc::string::ToString;
use alloc::vec::{self, Vec};
use core::fmt;
use core::slice;