mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 14:21:01 +00:00
Re-export NonZero* types from ::lib
This commit is contained in:
@@ -1936,7 +1936,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! nonzero_integers {
|
macro_rules! nonzero_integers {
|
||||||
( @ $( $T: ty, )+ ) => {
|
( $( $T: ty, )+ ) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "unstable")]
|
||||||
impl<'de> Deserialize<'de> for $T {
|
impl<'de> Deserialize<'de> for $T {
|
||||||
@@ -1953,9 +1953,6 @@ macro_rules! nonzero_integers {
|
|||||||
}
|
}
|
||||||
)+
|
)+
|
||||||
};
|
};
|
||||||
( $( $T: ident, )+ ) => {
|
|
||||||
nonzero_integers!(@ $(::lib::num::$T,)+ );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nonzero_integers! {
|
nonzero_integers! {
|
||||||
|
|||||||
+1
-1
@@ -215,7 +215,7 @@ mod lib {
|
|||||||
pub use core::nonzero::{NonZero, Zeroable};
|
pub use core::nonzero::{NonZero, Zeroable};
|
||||||
|
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "unstable")]
|
||||||
pub use core::num;
|
pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroUsize};
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ macro_rules! nonzero_integers {
|
|||||||
( $( $T: ident, )+ ) => {
|
( $( $T: ident, )+ ) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "unstable")]
|
||||||
impl Serialize for ::lib::num::$T {
|
impl Serialize for $T {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
S: Serializer,
|
S: Serializer,
|
||||||
|
|||||||
Reference in New Issue
Block a user