mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-28 05:21:05 +00:00
Re-export NonZero* types from ::lib
This commit is contained in:
parent
d7f9f8209d
commit
d45ca2f5e4
@ -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! {
|
||||||
|
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user