mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-01 15:01:49 +00:00
Require std for deserializing untagged enums
This commit is contained in:
parent
ff21d557c7
commit
d298da0b4f
@ -1,5 +1,11 @@
|
|||||||
use std::fmt;
|
use core::fmt;
|
||||||
use std::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
|
#[cfg(all(not(feature = "std"), feature = "collections"))]
|
||||||
|
use collections::{String, Vec};
|
||||||
|
|
||||||
|
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||||
|
use alloc::boxed::Box;
|
||||||
|
|
||||||
use de::{
|
use de::{
|
||||||
self,
|
self,
|
||||||
|
@ -115,6 +115,7 @@ mod from_primitive;
|
|||||||
// Helpers used by generated code. Not public API.
|
// Helpers used by generated code. Not public API.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub mod private;
|
pub mod private;
|
||||||
|
#[cfg(any(feature = "std", feature = "collections"))]
|
||||||
mod content;
|
mod content;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -2,6 +2,7 @@ use core::marker::PhantomData;
|
|||||||
|
|
||||||
use de::{Deserialize, Deserializer, Error, Visitor};
|
use de::{Deserialize, Deserializer, Error, Visitor};
|
||||||
|
|
||||||
|
#[cfg(any(feature = "std", feature = "collections"))]
|
||||||
pub use de::content::{
|
pub use de::content::{
|
||||||
Content,
|
Content,
|
||||||
TaggedContentVisitor,
|
TaggedContentVisitor,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use std::fmt::{self, Display};
|
use core::fmt::{self, Display};
|
||||||
|
|
||||||
use ser::{self, Serialize, Serializer, SerializeMap, SerializeStruct};
|
use ser::{self, Serialize, Serializer, SerializeMap, SerializeStruct};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user