diff --git a/CHANGELOG.md b/CHANGELOG.md index bc719254..e56d1f6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [1.9.0] - 2021-05-09 ### Added diff --git a/Cargo.toml b/Cargo.toml index 2d505c16..6ecc9a01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = [ "Marcin Kaźmierczak", ] name = "serde_with" -version = "1.8.1" +version = "1.9.0" categories = ["encoding"] description = "Custom de/serialization functions for Rust's serde" diff --git a/README.md b/README.md index 3b8f330f..7a12e5d8 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies.serde_with] -version = "1.8.1" +version = "1.9.0" features = [ "..." ] ``` @@ -124,15 +124,15 @@ Foo { } ``` -[`DisplayFromStr`]: https://docs.rs/serde_with/1.8.1/serde_with/struct.DisplayFromStr.html -[`with_prefix!`]: https://docs.rs/serde_with/1.8.1/serde_with/macro.with_prefix.html -[display_fromstr]: https://docs.rs/serde_with/1.8.1/serde_with/rust/display_fromstr/index.html -[feature flags]: https://docs.rs/serde_with/1.8.1/serde_with/guide/feature_flags/index.html -[skip_serializing_none]: https://docs.rs/serde_with/1.8.1/serde_with/attr.skip_serializing_none.html -[StringWithSeparator]: https://docs.rs/serde_with/1.8.1/serde_with/rust/struct.StringWithSeparator.html -[user guide]: https://docs.rs/serde_with/1.8.1/serde_with/guide/index.html +[`DisplayFromStr`]: https://docs.rs/serde_with/1.9.0/serde_with/struct.DisplayFromStr.html +[`with_prefix!`]: https://docs.rs/serde_with/1.9.0/serde_with/macro.with_prefix.html +[display_fromstr]: https://docs.rs/serde_with/1.9.0/serde_with/rust/display_fromstr/index.html +[feature flags]: https://docs.rs/serde_with/1.9.0/serde_with/guide/feature_flags/index.html +[skip_serializing_none]: https://docs.rs/serde_with/1.9.0/serde_with/attr.skip_serializing_none.html +[StringWithSeparator]: https://docs.rs/serde_with/1.9.0/serde_with/rust/struct.StringWithSeparator.html +[user guide]: https://docs.rs/serde_with/1.9.0/serde_with/guide/index.html [with-annotation]: https://serde.rs/field-attrs.html#with -[as-annotation]: https://docs.rs/serde_with/1.8.1/serde_with/guide/serde_as/index.html +[as-annotation]: https://docs.rs/serde_with/1.9.0/serde_with/guide/serde_as/index.html ## License diff --git a/serde_with_macros/src/lib.rs b/serde_with_macros/src/lib.rs index cd76bb23..b97437b6 100644 --- a/serde_with_macros/src/lib.rs +++ b/serde_with_macros/src/lib.rs @@ -479,8 +479,8 @@ fn field_has_attribute(field: &Field, namespace: &str, name: &str) -> bool { /// } /// ``` /// -/// [`serde_as`]: https://docs.rs/serde_with/1.8.1/serde_with/guide/index.html -/// [re-exporting `serde_as`]: https://docs.rs/serde_with/1.8.1/serde_with/guide/serde_as/index.html#re-exporting-serde_as +/// [`serde_as`]: https://docs.rs/serde_with/1.9.0/serde_with/guide/index.html +/// [re-exporting `serde_as`]: https://docs.rs/serde_with/1.9.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, Debug)] @@ -783,7 +783,7 @@ fn replace_infer_type_with_type(to_replace: Type, replacement: &Type) -> Type { /// [`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.8.1/serde_with/guide/serde_as/index.html#re-exporting-serde_as +/// [serde-as-crate]: https://docs.rs/serde_with/1.9.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 { @@ -893,7 +893,7 @@ fn deserialize_fromstr(input: DeriveInput, serde_with_crate_path: Path) -> Token /// [`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.8.1/serde_with/guide/serde_as/index.html#re-exporting-serde_as +/// [serde-as-crate]: https://docs.rs/serde_with/1.9.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/src/lib.rs b/src/lib.rs index 2cafb384..633de023 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,7 +25,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.8.1")] +#![doc(html_root_url = "https://docs.rs/serde_with/1.9.0")] // Necessary to silence the warning about clippy::unknown_clippy_lints on nightly #![allow(renamed_and_removed_lints)] // Rust 1.45: introduction of `strip_prefix` used by clippy::manual_strip @@ -38,7 +38,7 @@ //! //! --- //! -//! This crate provides custom de/serialization helpers to use in combination with [serde's with-annotation][with-annotation] and with the improved [`serde_as`][user guide]-annotation. +//! This crate provides custom de/serialization helpers to use in combination with [serde's with-annotation][with-annotation] and with the improved [`serde_as`][as-annotation]-annotation. //! Some common use cases are: //! //! * De/Serializing a type using the `Display` and `FromStr` traits, e.g., for `u8`, `url::Url`, or `mime::Mime`. @@ -61,7 +61,7 @@ //! //! ```toml //! [dependencies.serde_with] -//! version = "1.8.1" +//! version = "1.9.0" //! features = [ "..." ] //! ``` //! @@ -200,14 +200,15 @@ //! # } //! ``` //! -//! [`DisplayFromStr`]: https://docs.rs/serde_with/1.8.1/serde_with/struct.DisplayFromStr.html -//! [`with_prefix!`]: https://docs.rs/serde_with/1.8.1/serde_with/macro.with_prefix.html -//! [display_fromstr]: https://docs.rs/serde_with/1.8.1/serde_with/rust/display_fromstr/index.html -//! [feature flags]: https://docs.rs/serde_with/1.8.1/serde_with/guide/feature_flags/index.html -//! [skip_serializing_none]: https://docs.rs/serde_with/1.8.1/serde_with/attr.skip_serializing_none.html -//! [StringWithSeparator]: https://docs.rs/serde_with/1.8.1/serde_with/rust/struct.StringWithSeparator.html -//! [user guide]: https://docs.rs/serde_with/1.8.1/serde_with/guide/index.html +//! [`DisplayFromStr`]: https://docs.rs/serde_with/1.9.0/serde_with/struct.DisplayFromStr.html +//! [`with_prefix!`]: https://docs.rs/serde_with/1.9.0/serde_with/macro.with_prefix.html +//! [display_fromstr]: https://docs.rs/serde_with/1.9.0/serde_with/rust/display_fromstr/index.html +//! [feature flags]: https://docs.rs/serde_with/1.9.0/serde_with/guide/feature_flags/index.html +//! [skip_serializing_none]: https://docs.rs/serde_with/1.9.0/serde_with/attr.skip_serializing_none.html +//! [StringWithSeparator]: https://docs.rs/serde_with/1.9.0/serde_with/rust/struct.StringWithSeparator.html +//! [user guide]: https://docs.rs/serde_with/1.9.0/serde_with/guide/index.html //! [with-annotation]: https://serde.rs/field-attrs.html#with +//! [as-annotation]: https://docs.rs/serde_with/1.9.0/serde_with/guide/serde_as/index.html #[doc(hidden)] pub extern crate serde; @@ -343,7 +344,7 @@ impl Separator for CommaSeparator { /// # } /// ``` /// -/// [serde_as]: https://docs.rs/serde_with/1.8.1/serde_with/attr.serde_as.html +/// [serde_as]: https://docs.rs/serde_with/1.9.0/serde_with/attr.serde_as.html #[derive(Copy, Clone, Debug, Default)] pub struct As(PhantomData); @@ -809,7 +810,7 @@ pub struct BytesOrString; /// ``` /// /// [`chrono::Duration`]: chrono_crate::Duration -/// [feature flag]: https://docs.rs/serde_with/1.8.1/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/1.9.0/serde_with/guide/feature_flags/index.html #[derive(Copy, Clone, Debug, Default)] pub struct DurationSeconds< FORMAT: formats::Format = u64, @@ -935,7 +936,7 @@ pub struct DurationSeconds< /// ``` /// /// [`chrono::Duration`]: chrono_crate::Duration -/// [feature flag]: https://docs.rs/serde_with/1.8.1/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/1.9.0/serde_with/guide/feature_flags/index.html #[derive(Copy, Clone, Debug, Default)] pub struct DurationSecondsWithFrac< FORMAT: formats::Format = f64, @@ -1132,7 +1133,7 @@ pub struct DurationNanoSecondsWithFrac< /// /// [`SystemTime`]: std::time::SystemTime /// [DateTime]: chrono_crate::DateTime -/// [feature flag]: https://docs.rs/serde_with/1.8.1/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/1.9.0/serde_with/guide/feature_flags/index.html #[derive(Copy, Clone, Debug, Default)] pub struct TimestampSeconds< FORMAT: formats::Format = i64, @@ -1261,7 +1262,7 @@ pub struct TimestampSeconds< /// /// [`SystemTime`]: std::time::SystemTime /// [DateTime]: chrono_crate::DateTime -/// [feature flag]: https://docs.rs/serde_with/1.8.1/serde_with/guide/feature_flags/index.html +/// [feature flag]: https://docs.rs/serde_with/1.9.0/serde_with/guide/feature_flags/index.html #[derive(Copy, Clone, Debug, Default)] pub struct TimestampSecondsWithFrac< FORMAT: formats::Format = f64,