From 4027bbb66d6cfaca492a577c14607764cb9e556b Mon Sep 17 00:00:00 2001 From: Brandon W Maister Date: Fri, 13 Sep 2019 14:49:41 -0400 Subject: [PATCH] Rename serde-1 back to serde --- Cargo.toml | 1 - README.md | 2 +- ci/travis.sh | 27 ++++++++++++++------------- src/datetime.rs | 2 +- src/lib.rs | 8 ++++---- src/naive/date.rs | 2 +- src/naive/datetime.rs | 2 +- src/naive/time.rs | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d252cbc..58392f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,6 @@ name = "chrono" default = ["clock", "std"] alloc = [] std = [] -serde-1 = ["serde", "alloc"] clock = ["time", "std"] wasmbind = ["wasm-bindgen", "js-sys"] diff --git a/README.md b/README.md index 26b1a48..6401210 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ feature like this: ```toml [dependencies] -chrono = { version = "0.4", features = ["serde-1"] } +chrono = { version = "0.4", features = ["serde"] } ``` Then put this in your crate root: diff --git a/ci/travis.sh b/ci/travis.sh index 0145357..9665573 100755 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -48,20 +48,20 @@ build_and_test_nonwasm() { TZ=ACST-9:30 channel test -v --lib channel build -v --features rustc-serialize TZ=EST4 channel test -v --features rustc-serialize --lib - channel build -v --features serde-1 - TZ=UTC0 channel test -v --features serde-1 --lib - channel build -v --features serde-1,rustc-serialize - TZ=Asia/Katmandu channel test -v --features serde-1,rustc-serialize + channel build -v --features serde + TZ=UTC0 channel test -v --features serde --lib + channel build -v --features serde,rustc-serialize + TZ=Asia/Katmandu channel test -v --features serde,rustc-serialize # without default "clock" feature channel build -v --no-default-features --features std TZ=ACST-9:30 channel test -v --no-default-features --lib channel build -v --no-default-features --features std,rustc-serialize TZ=EST4 channel test -v --no-default-features --features rustc-serialize --lib - channel build -v --no-default-features --features std,serde-1 - TZ=UTC0 channel test -v --no-default-features --features serde-1 --lib - channel build -v --no-default-features --features std,serde-1,rustc-serialize - TZ=Asia/Katmandu channel test -v --no-default-features --features std,serde-1,rustc-serialize --lib + channel build -v --no-default-features --features std,serde + TZ=UTC0 channel test -v --no-default-features --features serde --lib + channel build -v --no-default-features --features std,serde,rustc-serialize + TZ=Asia/Katmandu channel test -v --no-default-features --features std,serde,rustc-serialize --lib } build_and_test_wasm() { @@ -81,15 +81,16 @@ build_only() { cargo clean channel build -v channel build -v --features rustc-serialize - channel build -v --features 'serde-1 bincode' + channel build -v --features 'serde bincode' channel build -v --no-default-features --features std } build_core_test() { rustup target add thumbv6m-none-eabi --toolchain $CHANNEL - cd ci/core-test - channel build -v --target thumbv6m-none-eabi - cd ../.. + ( + cd ci/core-test + channel build -v --target thumbv6m-none-eabi + ) } run_clippy() { @@ -99,7 +100,7 @@ run_clippy() { exit fi - cargo clippy --features 'serde-1 bincode rustc-serialize' -- -Dclippy + cargo clippy --features 'serde bincode rustc-serialize' -- -Dclippy } check_readme() { diff --git a/src/datetime.rs b/src/datetime.rs index 6adec62..99bd316 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -918,7 +918,7 @@ pub mod rustc_serialize { } /// documented at re-export site -#[cfg(feature = "serde-1")] +#[cfg(feature = "serde")] pub mod serde { use core::fmt; #[cfg(not(any(feature = "std", test)))] diff --git a/src/lib.rs b/src/lib.rs index b7f60b0..704f3b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -418,7 +418,7 @@ extern crate num_integer; extern crate num_traits; #[cfg(feature = "rustc-serialize")] extern crate rustc_serialize; -#[cfg(feature = "serde-1")] +#[cfg(feature = "serde")] extern crate serde as serdelib; #[cfg(test)] #[macro_use] @@ -497,7 +497,7 @@ pub mod naive { /// /// [1]: https://serde.rs/attributes.html#field-attributes /// [2]: https://tools.ietf.org/html/rfc3339 - #[cfg(feature = "serde-1")] + #[cfg(feature = "serde")] pub mod serde { pub use super::datetime::serde::*; } @@ -515,7 +515,7 @@ mod round; /// /// [1]: https://serde.rs/attributes.html#field-attributes /// [2]: https://tools.ietf.org/html/rfc3339 -#[cfg(feature = "serde-1")] +#[cfg(feature = "serde")] pub mod serde { pub use super::datetime::serde::*; } @@ -703,7 +703,7 @@ impl fmt::Debug for ParseWeekdayError { // the actual `FromStr` implementation is in the `format` module to leverage the existing code -#[cfg(feature = "serde-1")] +#[cfg(feature = "serde")] mod weekday_serde { use super::Weekday; use core::fmt; diff --git a/src/naive/date.rs b/src/naive/date.rs index 23c6f57..eecf84b 100644 --- a/src/naive/date.rs +++ b/src/naive/date.rs @@ -1602,7 +1602,7 @@ mod rustc_serialize { } } -#[cfg(feature = "serde-1")] +#[cfg(feature = "serde")] mod serde { use core::fmt; #[cfg(not(any(feature = "std", test)))] diff --git a/src/naive/datetime.rs b/src/naive/datetime.rs index 25eefe3..9d93b2f 100644 --- a/src/naive/datetime.rs +++ b/src/naive/datetime.rs @@ -1665,7 +1665,7 @@ pub mod rustc_serialize { } /// Tools to help serializing/deserializing `NaiveDateTime`s -#[cfg(feature = "serde-1")] +#[cfg(feature = "serde")] pub mod serde { use core::fmt; #[cfg(not(any(feature = "std", test)))] diff --git a/src/naive/time.rs b/src/naive/time.rs index 54bed5e..71379e7 100644 --- a/src/naive/time.rs +++ b/src/naive/time.rs @@ -1413,7 +1413,7 @@ mod rustc_serialize { } } -#[cfg(feature = "serde-1")] +#[cfg(feature = "serde")] mod serde { use core::fmt; #[cfg(not(any(feature = "std", test)))]