Merge pull request #1926 from attente/core-num-wrapping

Allow serializing of Wrapping without std
This commit is contained in:
David Tolnay
2020-12-05 13:43:20 -08:00
committed by GitHub
3 changed files with 1 additions and 4 deletions
-1
View File
@@ -2564,7 +2564,6 @@ where
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")]
impl<'de, T> Deserialize<'de> for Wrapping<T> impl<'de, T> Deserialize<'de> for Wrapping<T>
where where
T: Deserialize<'de>, T: Deserialize<'de>,
+1 -2
View File
@@ -166,6 +166,7 @@ mod lib {
pub use self::core::default::{self, Default}; pub use self::core::default::{self, Default};
pub use self::core::fmt::{self, Debug, Display}; pub use self::core::fmt::{self, Debug, Display};
pub use self::core::marker::{self, PhantomData}; pub use self::core::marker::{self, PhantomData};
pub use self::core::num::Wrapping;
pub use self::core::ops::Range; pub use self::core::ops::Range;
pub use self::core::option::{self, Option}; pub use self::core::option::{self, Option};
pub use self::core::result::{self, Result}; pub use self::core::result::{self, Result};
@@ -217,8 +218,6 @@ mod lib {
#[cfg(feature = "std")] #[cfg(feature = "std")]
pub use std::io::Write; pub use std::io::Write;
#[cfg(feature = "std")] #[cfg(feature = "std")]
pub use std::num::Wrapping;
#[cfg(feature = "std")]
pub use std::path::{Path, PathBuf}; pub use std::path::{Path, PathBuf};
#[cfg(feature = "std")] #[cfg(feature = "std")]
pub use std::sync::{Mutex, RwLock}; pub use std::sync::{Mutex, RwLock};
-1
View File
@@ -824,7 +824,6 @@ impl Serialize for OsString {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")]
impl<T> Serialize for Wrapping<T> impl<T> Serialize for Wrapping<T>
where where
T: Serialize, T: Serialize,