Require std for deserializing untagged enums

This commit is contained in:
David Tolnay
2017-02-02 19:06:28 -08:00
parent ff21d557c7
commit d298da0b4f
4 changed files with 11 additions and 3 deletions
+8 -2
View File
@@ -1,5 +1,11 @@
use std::fmt;
use std::marker::PhantomData;
use core::fmt;
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::{
self,
+1
View File
@@ -115,6 +115,7 @@ mod from_primitive;
// Helpers used by generated code. Not public API.
#[doc(hidden)]
pub mod private;
#[cfg(any(feature = "std", feature = "collections"))]
mod content;
///////////////////////////////////////////////////////////////////////////////
+1
View File
@@ -2,6 +2,7 @@ use core::marker::PhantomData;
use de::{Deserialize, Deserializer, Error, Visitor};
#[cfg(any(feature = "std", feature = "collections"))]
pub use de::content::{
Content,
TaggedContentVisitor,
+1 -1
View File
@@ -1,4 +1,4 @@
use std::fmt::{self, Display};
use core::fmt::{self, Display};
use ser::{self, Serialize, Serializer, SerializeMap, SerializeStruct};