From fbeea41e8f814fef9505a7e1a5b4035e68100ea5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 19 Dec 2022 11:00:45 +0100 Subject: [PATCH 1/2] fix in Cargo.toml file --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22eabe0..0004f8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,9 +35,9 @@ default-features = false version = "1.0" [features] -default = ["std", "dep:serde"] +default = ["std"] std = ["chrono/std", "chrono/clock", "alloc"] -serde = ["chrono/serde"] +serde = ["dep:serde", "chrono/serde"] alloc = ["postcard/alloc", "chrono/alloc"] [package.metadata.docs.rs] From 976fe9c49b101459ae305dbeb95a8108746b9a05 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 19 Dec 2022 11:02:36 +0100 Subject: [PATCH 2/2] README updates --- README.md | 5 ++++- src/lib.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed4e7e4..1545bf0 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,15 @@ It also offers optional support for [`serde`](https://serde.rs/). This allows se deserializing them with an appropriate `serde` provider like [`postcard`](https://github.com/jamesmunns/postcard). -Default features: +## Default features - [`std`](https://doc.rust-lang.org/std/): Enables functionality relying on the standard library. - [`alloc`](https://doc.rust-lang.org/alloc/): Enables features which operate on containers like [`alloc::vec::Vec`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html). Enabled by the `std` feature. + +## Optional Features + - [`serde`](https://serde.rs/): Adds `serde` support for most types by adding `Serialize` and `Deserialize` `derive`s # Examples diff --git a/src/lib.rs b/src/lib.rs index 6faec44..e26d481 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,12 +22,15 @@ //! deserializing them with an appropriate `serde` provider like //! [`postcard`](https://github.com/jamesmunns/postcard). //! -//! Default features: +//! ### Default features //! //! - [`std`](https://doc.rust-lang.org/std/): Enables functionality relying on the standard library. //! - [`alloc`](https://doc.rust-lang.org/alloc/): Enables features which operate on containers //! like [`alloc::vec::Vec`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html). //! Enabled by the `std` feature. +//! +//! ### Optional features +//! //! - [`serde`](https://serde.rs/): Adds `serde` support for most types by adding `Serialize` and //! `Deserialize` `derive`s //!