From 9c2923e23e28ecf560a0b0d05a0435095c303102 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Wed, 29 Jun 2022 21:00:15 +0000 Subject: [PATCH] Bump versions to v2.0.0-rc.0 --- README.md | 16 ++++++------- serde_with/CHANGELOG.md | 8 ++++--- serde_with/Cargo.toml | 4 ++-- serde_with/src/lib.rs | 28 +++++++++++----------- serde_with/tests/version_numbers.rs | 2 +- serde_with_macros/CHANGELOG.md | 2 ++ serde_with_macros/Cargo.toml | 2 +- serde_with_macros/src/lib.rs | 10 ++++---- serde_with_macros/tests/version_numbers.rs | 2 +- 9 files changed, 39 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index e4288a0d..33182da6 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies.serde_with] -version = "1.14.0" +version = "2.0.0-rc.0" features = [ "..." ] ``` @@ -158,14 +158,14 @@ Foo { } ``` -[`DisplayFromStr`]: https://docs.rs/serde_with/1.14.0/serde_with/struct.DisplayFromStr.html -[`with_prefix!`]: https://docs.rs/serde_with/1.14.0/serde_with/macro.with_prefix.html -[feature flags]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html -[skip_serializing_none]: https://docs.rs/serde_with/1.14.0/serde_with/attr.skip_serializing_none.html -[StringWithSeparator]: https://docs.rs/serde_with/1.14.0/serde_with/rust/struct.StringWithSeparator.html -[user guide]: https://docs.rs/serde_with/1.14.0/serde_with/guide/index.html +[`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/struct.DisplayFromStr.html +[`with_prefix!`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/macro.with_prefix.html +[feature flags]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html +[skip_serializing_none]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/attr.skip_serializing_none.html +[StringWithSeparator]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/rust/struct.StringWithSeparator.html +[user guide]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/index.html [with-annotation]: https://serde.rs/field-attrs.html#with -[as-annotation]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html +[as-annotation]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html ## License diff --git a/serde_with/CHANGELOG.md b/serde_with/CHANGELOG.md index 3279c00a..51a3b5fa 100644 --- a/serde_with/CHANGELOG.md +++ b/serde_with/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [2.0.0-rc.0] - 2022-06-29 + ### Changed * Make `#[serde_as]` behave more intuitive on `Option` fields. @@ -22,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * `core::option::Option`, with or without leading `::` If an existing `default` attribute is detected, the attribute is not applied again. - This behavior can be supressed by using `#[serde_as(no_default)]` or `#[serde_as(as = "Option", no_default)]`. + This behavior can be suppressed by using `#[serde_as(no_default)]` or `#[serde_as(as = "Option", no_default)]`. * `NoneAsEmptyString` and `string_empty_as_none` use a different serialization bound (#388). Both types used `AsRef` as the serialization bound. @@ -30,13 +32,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. The deserialization often was already more flexible, due to the `FromStr` bound. For most std types this should have little impact, as the types implementing `AsRef` mostly implement `Display`, too, such as `String`, `Cow`, or `Rc`. -* Bump MSRV to 1.60. This is required for the optional depedency feature syntax in cargo. +* Bump MSRV to 1.60. This is required for the optional dependency feature syntax in cargo. ### Removed * Remove old module based conversions. - The newer `serde_as` based conversions are prefered. + The newer `serde_as` based conversions are preferred. * `seq_display_fromstr`: Use `DisplayFromStr` in combination with your container type: diff --git a/serde_with/Cargo.toml b/serde_with/Cargo.toml index 2c08d88e..ad52f92e 100644 --- a/serde_with/Cargo.toml +++ b/serde_with/Cargo.toml @@ -6,7 +6,7 @@ authors = [ ] name = "serde_with" rust-version = "1.60" -version = "1.14.0" +version = "2.0.0-rc.0" categories = ["encoding", "no-std"] description = "Custom de/serialization functions for Rust's serde" @@ -67,7 +67,7 @@ hex = {version = "0.4.3", optional = true, default-features = false} indexmap_1 = {package = "indexmap", version = "1.8", optional = true, default-features = false, features = ["serde-1"]} serde = {version = "1.0.122", default-features = false, features = ["derive"]} serde_json = {version = "1.0.45", optional = true, default-features = false} -serde_with_macros = {path = "../serde_with_macros", version = "1.5.2", optional = true} +serde_with_macros = {path = "../serde_with_macros", version = "=2.0.0-rc.0", optional = true} time_0_3 = {package = "time", version = "~0.3", optional = true, default-features = false} [dev-dependencies] diff --git a/serde_with/src/lib.rs b/serde_with/src/lib.rs index add74520..065c3a4e 100644 --- a/serde_with/src/lib.rs +++ b/serde_with/src/lib.rs @@ -22,7 +22,7 @@ #![doc(test(attr(warn(rust_2018_idioms))))] // Not needed for 2018 edition and conflicts with `rust_2018_idioms` #![doc(test(no_crate_inject))] -#![doc(html_root_url = "https://docs.rs/serde_with/1.14.0")] +#![doc(html_root_url = "https://docs.rs/serde_with/2.0.0-rc.0")] #![cfg_attr(docsrs, feature(doc_cfg))] #![allow( // clippy is broken and shows wrong warnings @@ -69,7 +69,7 @@ //! //! ```toml //! [dependencies.serde_with] -//! version = "1.14.0" +//! version = "2.0.0-rc.0" //! features = [ "..." ] //! ``` //! @@ -248,14 +248,14 @@ //! # } //! ``` //! -//! [`DisplayFromStr`]: https://docs.rs/serde_with/1.14.0/serde_with/struct.DisplayFromStr.html -//! [`with_prefix!`]: https://docs.rs/serde_with/1.14.0/serde_with/macro.with_prefix.html -//! [feature flags]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html -//! [skip_serializing_none]: https://docs.rs/serde_with/1.14.0/serde_with/attr.skip_serializing_none.html -//! [StringWithSeparator]: https://docs.rs/serde_with/1.14.0/serde_with/rust/struct.StringWithSeparator.html -//! [user guide]: https://docs.rs/serde_with/1.14.0/serde_with/guide/index.html +//! [`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/struct.DisplayFromStr.html +//! [`with_prefix!`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/macro.with_prefix.html +//! [feature flags]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html +//! [skip_serializing_none]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/attr.skip_serializing_none.html +//! [StringWithSeparator]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/rust/struct.StringWithSeparator.html +//! [user guide]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/index.html //! [with-annotation]: https://serde.rs/field-attrs.html#with -//! [as-annotation]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html +//! [as-annotation]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html #[cfg(feature = "alloc")] extern crate alloc; @@ -396,7 +396,7 @@ pub use serde_with_macros::*; /// # } /// ``` /// -/// [serde_as]: https://docs.rs/serde_with/1.14.0/serde_with/attr.serde_as.html +/// [serde_as]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/attr.serde_as.html pub struct As(PhantomData); impl As { @@ -853,7 +853,7 @@ pub struct BytesOrString; /// ``` /// /// [`chrono::Duration`]: ::chrono_0_4::Duration -/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html pub struct DurationSeconds< FORMAT: formats::Format = u64, STRICTNESS: formats::Strictness = formats::Strict, @@ -981,7 +981,7 @@ pub struct DurationSeconds< /// ``` /// /// [`chrono::Duration`]: ::chrono_0_4::Duration -/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html pub struct DurationSecondsWithFrac< FORMAT: formats::Format = f64, STRICTNESS: formats::Strictness = formats::Strict, @@ -1177,7 +1177,7 @@ pub struct DurationNanoSecondsWithFrac< /// [`SystemTime`]: std::time::SystemTime /// [`chrono::DateTime`]: ::chrono_0_4::DateTime /// [`chrono::DateTime`]: ::chrono_0_4::DateTime -/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html pub struct TimestampSeconds< FORMAT: formats::Format = i64, STRICTNESS: formats::Strictness = formats::Strict, @@ -1315,7 +1315,7 @@ pub struct TimestampSeconds< /// [`chrono::DateTime`]: ::chrono_0_4::DateTime /// [`chrono::DateTime`]: ::chrono_0_4::DateTime /// [NaiveDateTime]: ::chrono_0_4::NaiveDateTime -/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html pub struct TimestampSecondsWithFrac< FORMAT: formats::Format = f64, STRICTNESS: formats::Strictness = formats::Strict, diff --git a/serde_with/tests/version_numbers.rs b/serde_with/tests/version_numbers.rs index 5c478d91..088dcb3a 100644 --- a/serde_with/tests/version_numbers.rs +++ b/serde_with/tests/version_numbers.rs @@ -1,4 +1,4 @@ -// Needed to supress a 2021 incompatability warning in the macro generated code +// Needed to suppress a 2021 incompatibility warning in the macro generated code // The non_fmt_panic lint is not yet available on most Rust versions #![allow(unknown_lints, non_fmt_panics)] diff --git a/serde_with_macros/CHANGELOG.md b/serde_with_macros/CHANGELOG.md index 3e721c79..59a99eab 100644 --- a/serde_with_macros/CHANGELOG.md +++ b/serde_with_macros/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [2.0.0-rc.0] - 2022-06-29 + ### Changed * Make `#[serde_as]` behave more intuitive on `Option` fields. diff --git a/serde_with_macros/Cargo.toml b/serde_with_macros/Cargo.toml index 3a2799ee..d39aff48 100644 --- a/serde_with_macros/Cargo.toml +++ b/serde_with_macros/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Jonas Bushart"] name = "serde_with_macros" rust-version = "1.60" -version = "1.5.2" +version = "2.0.0-rc.0" categories = ["encoding"] description = "proc-macro library for serde_with" diff --git a/serde_with_macros/src/lib.rs b/serde_with_macros/src/lib.rs index e014895f..2b131437 100644 --- a/serde_with_macros/src/lib.rs +++ b/serde_with_macros/src/lib.rs @@ -26,7 +26,7 @@ #![doc(test(attr(warn(rust_2018_idioms))))] // Not needed for 2018 edition and conflicts with `rust_2018_idioms` #![doc(test(no_crate_inject))] -#![doc(html_root_url = "https://docs.rs/serde_with_macros/1.5.2")] +#![doc(html_root_url = "https://docs.rs/serde_with_macros/2.0.0-rc.0")] // Necessary to silence the warning about clippy::unknown_clippy_lints on nightly #![allow(renamed_and_removed_lints)] // Necessary for nightly clippy lints @@ -526,8 +526,8 @@ fn field_has_attribute(field: &Field, namespace: &str, name: &str) -> bool { /// } /// ``` /// -/// [`serde_as`]: https://docs.rs/serde_with/1.14.0/serde_with/guide/index.html -/// [re-exporting `serde_as`]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as +/// [`serde_as`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/index.html +/// [re-exporting `serde_as`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as #[proc_macro_attribute] pub fn serde_as(args: TokenStream, input: TokenStream) -> TokenStream { #[derive(FromMeta)] @@ -915,7 +915,7 @@ fn has_type_embedded(type_: &Type, embedded_type: &syn::Ident) -> bool { /// [`Display`]: std::fmt::Display /// [`FromStr`]: std::str::FromStr /// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml -/// [serde-as-crate]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as +/// [serde-as-crate]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as /// [serde-crate]: https://serde.rs/container-attrs.html#crate #[proc_macro_derive(DeserializeFromStr, attributes(serde_with))] pub fn derive_deserialize_fromstr(item: TokenStream) -> TokenStream { @@ -1027,7 +1027,7 @@ fn deserialize_fromstr(mut input: DeriveInput, serde_with_crate_path: Path) -> T /// [`Display`]: std::fmt::Display /// [`FromStr`]: std::str::FromStr /// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml -/// [serde-as-crate]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as +/// [serde-as-crate]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as /// [serde-crate]: https://serde.rs/container-attrs.html#crate #[proc_macro_derive(SerializeDisplay, attributes(serde_with))] pub fn derive_serialize_display(item: TokenStream) -> TokenStream { diff --git a/serde_with_macros/tests/version_numbers.rs b/serde_with_macros/tests/version_numbers.rs index 4680a9d8..b3d4885c 100644 --- a/serde_with_macros/tests/version_numbers.rs +++ b/serde_with_macros/tests/version_numbers.rs @@ -16,6 +16,6 @@ fn test_changelog() { fn test_serde_with_dependency() { version_sync::assert_contains_regex!( "../serde_with/Cargo.toml", - r#"^serde_with_macros = .*? version = "{version}""# + r#"^serde_with_macros = .*? version = "=?{version}""# ); }