Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump versions to v2.0.1 #515

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ Foo::Bytes {
}
```

[`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0/serde_with/struct.DisplayFromStr.html
[`with_prefix!`]: https://docs.rs/serde_with/2.0.0/serde_with/macro.with_prefix.html
[feature flags]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
[skip_serializing_none]: https://docs.rs/serde_with/2.0.0/serde_with/attr.skip_serializing_none.html
[StringWithSeparator]: https://docs.rs/serde_with/2.0.0/serde_with/struct.StringWithSeparator.html
[user guide]: https://docs.rs/serde_with/2.0.0/serde_with/guide/index.html
[`DisplayFromStr`]: https://docs.rs/serde_with/2.0.1/serde_with/struct.DisplayFromStr.html
[`with_prefix!`]: https://docs.rs/serde_with/2.0.1/serde_with/macro.with_prefix.html
[feature flags]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
[skip_serializing_none]: https://docs.rs/serde_with/2.0.1/serde_with/attr.skip_serializing_none.html
[StringWithSeparator]: https://docs.rs/serde_with/2.0.1/serde_with/struct.StringWithSeparator.html
[user guide]: https://docs.rs/serde_with/2.0.1/serde_with/guide/index.html
[with-annotation]: https://serde.rs/field-attrs.html#with
[as-annotation]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html
[as-annotation]: https://docs.rs/serde_with/2.0.1/serde_with/guide/serde_as/index.html

## License

Expand Down
13 changes: 13 additions & 0 deletions serde_with/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.0.1] - 2022-09-09

### Added

* `time` added support for the well-known `Iso8601` format.
Expand All @@ -18,6 +20,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Attributes on enum variants were never supported.
But `#[serde(with = "...")]` can be added on variants, such that some confusion can occur when migration ([#499](https://github.com/jonasbb/serde_with/issues/499)).

### Note

A cargo bug ([cargo#10801](https://github.com/rust-lang/cargo/issues/10801)) means that upgrading from v1 to v2 may add unnecessary crates to the `Cargo.lock` file.
A diff of the lock-file makes it seem that `serde_with` depends on new crates, even though these crates are unused and will not get compiled or linked.
However, tools consuming `Cargo.lock` or `cargo metadata` might give wrong results.

## [2.0.0] - 2022-07-17

### Added
Expand Down Expand Up @@ -96,6 +104,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* `sets_first_value_wins`
* `btreemap_as_tuple_list` and `hashmap_as_tuple_list` can be replaced with `#[serde_as(as = "Vec<(_, _)>")]`.

### Note

A cargo bug ([cargo#10801](https://github.com/rust-lang/cargo/issues/10801)) means that upgrading from v1 to v2 may add unnecessary crates to the `Cargo.lock` file.
A diff of the lock-file makes it seem that `serde_with` depends on new crates, even though these crates are unused and will not get compiled or linked.

## [2.0.0-rc.0] - 2022-06-29

### Changed
Expand Down
4 changes: 2 additions & 2 deletions serde_with/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
]
name = "serde_with"
rust-version = "1.60"
version = "2.0.0"
version = "2.0.1"

categories = ["encoding", "no-std"]
description = "Custom de/serialization functions for Rust's serde"
Expand Down Expand Up @@ -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 = "2.0.0", optional = true}
serde_with_macros = {path = "../serde_with_macros", version = "2.0.1", optional = true}
time_0_3 = {package = "time", version = "~0.3.11", optional = true, default-features = false}

[dev-dependencies]
Expand Down
26 changes: 13 additions & 13 deletions serde_with/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/2.0.0")]
#![doc(html_root_url = "https://docs.rs/serde_with/2.0.1")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(
// clippy is broken and shows wrong warnings
Expand Down Expand Up @@ -270,14 +270,14 @@
//! # }
//! ```
//!
//! [`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0/serde_with/struct.DisplayFromStr.html
//! [`with_prefix!`]: https://docs.rs/serde_with/2.0.0/serde_with/macro.with_prefix.html
//! [feature flags]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
//! [skip_serializing_none]: https://docs.rs/serde_with/2.0.0/serde_with/attr.skip_serializing_none.html
//! [StringWithSeparator]: https://docs.rs/serde_with/2.0.0/serde_with/struct.StringWithSeparator.html
//! [user guide]: https://docs.rs/serde_with/2.0.0/serde_with/guide/index.html
//! [`DisplayFromStr`]: https://docs.rs/serde_with/2.0.1/serde_with/struct.DisplayFromStr.html
//! [`with_prefix!`]: https://docs.rs/serde_with/2.0.1/serde_with/macro.with_prefix.html
//! [feature flags]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
//! [skip_serializing_none]: https://docs.rs/serde_with/2.0.1/serde_with/attr.skip_serializing_none.html
//! [StringWithSeparator]: https://docs.rs/serde_with/2.0.1/serde_with/struct.StringWithSeparator.html
//! [user guide]: https://docs.rs/serde_with/2.0.1/serde_with/guide/index.html
//! [with-annotation]: https://serde.rs/field-attrs.html#with
//! [as-annotation]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html
//! [as-annotation]: https://docs.rs/serde_with/2.0.1/serde_with/guide/serde_as/index.html

#[cfg(feature = "alloc")]
extern crate alloc;
Expand Down Expand Up @@ -471,7 +471,7 @@ pub use serde_with_macros::*;
/// # }
/// ```
///
/// [serde_as]: https://docs.rs/serde_with/2.0.0/serde_with/attr.serde_as.html
/// [serde_as]: https://docs.rs/serde_with/2.0.1/serde_with/attr.serde_as.html
pub struct As<T: ?Sized>(PhantomData<T>);

/// Adapter to convert from `serde_as` to the serde traits.
Expand Down Expand Up @@ -899,7 +899,7 @@ pub struct BytesOrString;
/// ```
///
/// [`chrono::Duration`]: ::chrono_0_4::Duration
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
pub struct DurationSeconds<
FORMAT: formats::Format = u64,
STRICTNESS: formats::Strictness = formats::Strict,
Expand Down Expand Up @@ -1027,7 +1027,7 @@ pub struct DurationSeconds<
/// ```
///
/// [`chrono::Duration`]: ::chrono_0_4::Duration
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
pub struct DurationSecondsWithFrac<
FORMAT: formats::Format = f64,
STRICTNESS: formats::Strictness = formats::Strict,
Expand Down Expand Up @@ -1223,7 +1223,7 @@ pub struct DurationNanoSecondsWithFrac<
/// [`SystemTime`]: std::time::SystemTime
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
pub struct TimestampSeconds<
FORMAT: formats::Format = i64,
STRICTNESS: formats::Strictness = formats::Strict,
Expand Down Expand Up @@ -1361,7 +1361,7 @@ pub struct TimestampSeconds<
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
/// [NaiveDateTime]: ::chrono_0_4::NaiveDateTime
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
pub struct TimestampSecondsWithFrac<
FORMAT: formats::Format = f64,
STRICTNESS: formats::Strictness = formats::Strict,
Expand Down
2 changes: 2 additions & 0 deletions serde_with_macros/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.0.1] - 2022-09-09

### Changed

* Warn if `serde_as` is used on an enum variant.
Expand Down
2 changes: 1 addition & 1 deletion serde_with_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Jonas Bushart"]
name = "serde_with_macros"
rust-version = "1.60"
version = "2.0.0"
version = "2.0.1"

categories = ["encoding"]
description = "proc-macro library for serde_with"
Expand Down
10 changes: 5 additions & 5 deletions serde_with_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/2.0.0")]
#![doc(html_root_url = "https://docs.rs/serde_with_macros/2.0.1")]
// Necessary to silence the warning about clippy::unknown_clippy_lints on nightly
#![allow(renamed_and_removed_lints)]
// Necessary for nightly clippy lints
Expand Down Expand Up @@ -551,8 +551,8 @@ fn field_has_attribute(field: &Field, namespace: &str, name: &str) -> bool {
/// }
/// ```
///
/// [`serde_as`]: https://docs.rs/serde_with/2.0.0/serde_with/guide/index.html
/// [re-exporting `serde_as`]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
/// [`serde_as`]: https://docs.rs/serde_with/2.0.1/serde_with/guide/index.html
/// [re-exporting `serde_as`]: https://docs.rs/serde_with/2.0.1/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)]
Expand Down Expand Up @@ -940,7 +940,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/2.0.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.1/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 {
Expand Down Expand Up @@ -1052,7 +1052,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/2.0.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.1/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 {
Expand Down