internals: Feature gate whole serde module
Instead of feature gating the individual code blocks just feature gate the whole `serde` module.
This commit is contained in:
parent
9ddd7dacac
commit
4a2b13fcde
|
@ -26,4 +26,5 @@ pub mod const_tools;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod macros;
|
pub mod macros;
|
||||||
mod parse;
|
mod parse;
|
||||||
|
#[cfg(feature = "serde")]
|
||||||
pub mod serde;
|
pub mod serde;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
//! Contains extensions of `serde` and internal reexports.
|
//! Contains extensions of `serde` and internal reexports.
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use serde::{de, ser, Deserialize, Deserializer, Serialize, Serializer};
|
pub use serde::{de, ser, Deserialize, Deserializer, Serialize, Serializer};
|
||||||
|
|
||||||
|
@ -8,7 +7,6 @@ pub use serde::{de, ser, Deserialize, Deserializer, Serialize, Serializer};
|
||||||
///
|
///
|
||||||
/// This is used in [`Deserialize`] implementations to convert specialized errors into serde
|
/// This is used in [`Deserialize`] implementations to convert specialized errors into serde
|
||||||
/// errors.
|
/// errors.
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
pub trait IntoDeError: Sized {
|
pub trait IntoDeError: Sized {
|
||||||
/// Converts to deserializer error possibly outputting vague message.
|
/// Converts to deserializer error possibly outputting vague message.
|
||||||
///
|
///
|
||||||
|
@ -28,7 +26,6 @@ pub trait IntoDeError: Sized {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
mod impls {
|
mod impls {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue