From a383abf30e2e2a21ec0bb32554fc295d1d7c5297 Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Mon, 15 Aug 2022 10:01:42 +0200 Subject: [PATCH] Clarify serde module contains defaults too in docs (#777) Makes it more clear the serde module isn't *only* for alternatives it is also required for the default implementations. --- src/lib.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index aa4342f454..eed9b259ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -506,14 +506,15 @@ pub use traits::{Datelike, Timelike}; #[doc(hidden)] pub use naive::__BenchYearFlags; -/// Serialization/Deserialization in alternate formats +/// Serialization/Deserialization with serde. /// -/// The various modules in here are intended to be used with serde's [`with` -/// annotation][1] to serialize as something other than the default [RFC -/// 3339][2] format. +/// This module provides default implementations for `DateTime` using the [RFC 3339][1] format and various +/// alternatives for use with serde's [`with` annotation][1]. /// -/// [1]: https://serde.rs/attributes.html#field-attributes -/// [2]: https://tools.ietf.org/html/rfc3339 +/// *Available on crate feature 'serde' only.* +/// +/// [1]: https://tools.ietf.org/html/rfc3339 +/// [2]: https://serde.rs/attributes.html#field-attributes #[cfg(feature = "serde")] pub mod serde { pub use super::datetime::serde::*;