Skip to content

Commit 7753240

Browse files
bors[bot]jonasbb
andauthored
Merge #515
515: Bump versions to v2.0.1 r=jonasbb a=jonasbb bors r+ Co-authored-by: Jonas Bushart <[email protected]>
2 parents 7718cdc + cb8efcc commit 7753240

File tree

7 files changed

+43
-28
lines changed

7 files changed

+43
-28
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ Foo::Bytes {
170170
}
171171
```
172172

173-
[`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0/serde_with/struct.DisplayFromStr.html
174-
[`with_prefix!`]: https://docs.rs/serde_with/2.0.0/serde_with/macro.with_prefix.html
175-
[feature flags]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
176-
[skip_serializing_none]: https://docs.rs/serde_with/2.0.0/serde_with/attr.skip_serializing_none.html
177-
[StringWithSeparator]: https://docs.rs/serde_with/2.0.0/serde_with/struct.StringWithSeparator.html
178-
[user guide]: https://docs.rs/serde_with/2.0.0/serde_with/guide/index.html
173+
[`DisplayFromStr`]: https://docs.rs/serde_with/2.0.1/serde_with/struct.DisplayFromStr.html
174+
[`with_prefix!`]: https://docs.rs/serde_with/2.0.1/serde_with/macro.with_prefix.html
175+
[feature flags]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
176+
[skip_serializing_none]: https://docs.rs/serde_with/2.0.1/serde_with/attr.skip_serializing_none.html
177+
[StringWithSeparator]: https://docs.rs/serde_with/2.0.1/serde_with/struct.StringWithSeparator.html
178+
[user guide]: https://docs.rs/serde_with/2.0.1/serde_with/guide/index.html
179179
[with-annotation]: https://serde.rs/field-attrs.html#with
180-
[as-annotation]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html
180+
[as-annotation]: https://docs.rs/serde_with/2.0.1/serde_with/guide/serde_as/index.html
181181

182182
## License
183183

serde_with/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [2.0.1] - 2022-09-09
11+
1012
### Added
1113

1214
* `time` added support for the well-known `Iso8601` format.
@@ -18,6 +20,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1820
Attributes on enum variants were never supported.
1921
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)).
2022

23+
### Note
24+
25+
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.
26+
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.
27+
However, tools consuming `Cargo.lock` or `cargo metadata` might give wrong results.
28+
2129
## [2.0.0] - 2022-07-17
2230

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

107+
### Note
108+
109+
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.
110+
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.
111+
99112
## [2.0.0-rc.0] - 2022-06-29
100113

101114
### Changed

serde_with/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
]
77
name = "serde_with"
88
rust-version = "1.60"
9-
version = "2.0.0"
9+
version = "2.0.1"
1010

1111
categories = ["encoding", "no-std"]
1212
description = "Custom de/serialization functions for Rust's serde"
@@ -67,7 +67,7 @@ hex = {version = "0.4.3", optional = true, default-features = false}
6767
indexmap_1 = {package = "indexmap", version = "1.8", optional = true, default-features = false, features = ["serde-1"]}
6868
serde = {version = "1.0.122", default-features = false, features = ["derive"]}
6969
serde_json = {version = "1.0.45", optional = true, default-features = false}
70-
serde_with_macros = {path = "../serde_with_macros", version = "2.0.0", optional = true}
70+
serde_with_macros = {path = "../serde_with_macros", version = "2.0.1", optional = true}
7171
time_0_3 = {package = "time", version = "~0.3.11", optional = true, default-features = false}
7272

7373
[dev-dependencies]

serde_with/src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#![doc(test(attr(warn(rust_2018_idioms))))]
2727
// Not needed for 2018 edition and conflicts with `rust_2018_idioms`
2828
#![doc(test(no_crate_inject))]
29-
#![doc(html_root_url = "https://docs.rs/serde_with/2.0.0")]
29+
#![doc(html_root_url = "https://docs.rs/serde_with/2.0.1")]
3030
#![cfg_attr(docsrs, feature(doc_cfg))]
3131
#![allow(
3232
// clippy is broken and shows wrong warnings
@@ -270,14 +270,14 @@
270270
//! # }
271271
//! ```
272272
//!
273-
//! [`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0/serde_with/struct.DisplayFromStr.html
274-
//! [`with_prefix!`]: https://docs.rs/serde_with/2.0.0/serde_with/macro.with_prefix.html
275-
//! [feature flags]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
276-
//! [skip_serializing_none]: https://docs.rs/serde_with/2.0.0/serde_with/attr.skip_serializing_none.html
277-
//! [StringWithSeparator]: https://docs.rs/serde_with/2.0.0/serde_with/struct.StringWithSeparator.html
278-
//! [user guide]: https://docs.rs/serde_with/2.0.0/serde_with/guide/index.html
273+
//! [`DisplayFromStr`]: https://docs.rs/serde_with/2.0.1/serde_with/struct.DisplayFromStr.html
274+
//! [`with_prefix!`]: https://docs.rs/serde_with/2.0.1/serde_with/macro.with_prefix.html
275+
//! [feature flags]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
276+
//! [skip_serializing_none]: https://docs.rs/serde_with/2.0.1/serde_with/attr.skip_serializing_none.html
277+
//! [StringWithSeparator]: https://docs.rs/serde_with/2.0.1/serde_with/struct.StringWithSeparator.html
278+
//! [user guide]: https://docs.rs/serde_with/2.0.1/serde_with/guide/index.html
279279
//! [with-annotation]: https://serde.rs/field-attrs.html#with
280-
//! [as-annotation]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html
280+
//! [as-annotation]: https://docs.rs/serde_with/2.0.1/serde_with/guide/serde_as/index.html
281281
282282
#[cfg(feature = "alloc")]
283283
extern crate alloc;
@@ -471,7 +471,7 @@ pub use serde_with_macros::*;
471471
/// # }
472472
/// ```
473473
///
474-
/// [serde_as]: https://docs.rs/serde_with/2.0.0/serde_with/attr.serde_as.html
474+
/// [serde_as]: https://docs.rs/serde_with/2.0.1/serde_with/attr.serde_as.html
475475
pub struct As<T: ?Sized>(PhantomData<T>);
476476

477477
/// Adapter to convert from `serde_as` to the serde traits.
@@ -899,7 +899,7 @@ pub struct BytesOrString;
899899
/// ```
900900
///
901901
/// [`chrono::Duration`]: ::chrono_0_4::Duration
902-
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
902+
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
903903
pub struct DurationSeconds<
904904
FORMAT: formats::Format = u64,
905905
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1027,7 +1027,7 @@ pub struct DurationSeconds<
10271027
/// ```
10281028
///
10291029
/// [`chrono::Duration`]: ::chrono_0_4::Duration
1030-
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
1030+
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
10311031
pub struct DurationSecondsWithFrac<
10321032
FORMAT: formats::Format = f64,
10331033
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1223,7 +1223,7 @@ pub struct DurationNanoSecondsWithFrac<
12231223
/// [`SystemTime`]: std::time::SystemTime
12241224
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
12251225
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
1226-
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
1226+
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
12271227
pub struct TimestampSeconds<
12281228
FORMAT: formats::Format = i64,
12291229
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1361,7 +1361,7 @@ pub struct TimestampSeconds<
13611361
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
13621362
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
13631363
/// [NaiveDateTime]: ::chrono_0_4::NaiveDateTime
1364-
/// [feature flag]: https://docs.rs/serde_with/2.0.0/serde_with/guide/feature_flags/index.html
1364+
/// [feature flag]: https://docs.rs/serde_with/2.0.1/serde_with/guide/feature_flags/index.html
13651365
pub struct TimestampSecondsWithFrac<
13661366
FORMAT: formats::Format = f64,
13671367
STRICTNESS: formats::Strictness = formats::Strict,

serde_with_macros/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [2.0.1] - 2022-09-09
11+
1012
### Changed
1113

1214
* Warn if `serde_as` is used on an enum variant.

serde_with_macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Jonas Bushart"]
33
name = "serde_with_macros"
44
rust-version = "1.60"
5-
version = "2.0.0"
5+
version = "2.0.1"
66

77
categories = ["encoding"]
88
description = "proc-macro library for serde_with"

serde_with_macros/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#![doc(test(attr(warn(rust_2018_idioms))))]
2727
// Not needed for 2018 edition and conflicts with `rust_2018_idioms`
2828
#![doc(test(no_crate_inject))]
29-
#![doc(html_root_url = "https://docs.rs/serde_with_macros/2.0.0")]
29+
#![doc(html_root_url = "https://docs.rs/serde_with_macros/2.0.1")]
3030
// Necessary to silence the warning about clippy::unknown_clippy_lints on nightly
3131
#![allow(renamed_and_removed_lints)]
3232
// Necessary for nightly clippy lints
@@ -551,8 +551,8 @@ fn field_has_attribute(field: &Field, namespace: &str, name: &str) -> bool {
551551
/// }
552552
/// ```
553553
///
554-
/// [`serde_as`]: https://docs.rs/serde_with/2.0.0/serde_with/guide/index.html
555-
/// [re-exporting `serde_as`]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
554+
/// [`serde_as`]: https://docs.rs/serde_with/2.0.1/serde_with/guide/index.html
555+
/// [re-exporting `serde_as`]: https://docs.rs/serde_with/2.0.1/serde_with/guide/serde_as/index.html#re-exporting-serde_as
556556
#[proc_macro_attribute]
557557
pub fn serde_as(args: TokenStream, input: TokenStream) -> TokenStream {
558558
#[derive(FromMeta)]
@@ -940,7 +940,7 @@ fn has_type_embedded(type_: &Type, embedded_type: &syn::Ident) -> bool {
940940
/// [`Display`]: std::fmt::Display
941941
/// [`FromStr`]: std::str::FromStr
942942
/// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
943-
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
943+
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.1/serde_with/guide/serde_as/index.html#re-exporting-serde_as
944944
/// [serde-crate]: https://serde.rs/container-attrs.html#crate
945945
#[proc_macro_derive(DeserializeFromStr, attributes(serde_with))]
946946
pub fn derive_deserialize_fromstr(item: TokenStream) -> TokenStream {
@@ -1052,7 +1052,7 @@ fn deserialize_fromstr(mut input: DeriveInput, serde_with_crate_path: Path) -> T
10521052
/// [`Display`]: std::fmt::Display
10531053
/// [`FromStr`]: std::str::FromStr
10541054
/// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
1055-
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
1055+
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.1/serde_with/guide/serde_as/index.html#re-exporting-serde_as
10561056
/// [serde-crate]: https://serde.rs/container-attrs.html#crate
10571057
#[proc_macro_derive(SerializeDisplay, attributes(serde_with))]
10581058
pub fn derive_serialize_display(item: TokenStream) -> TokenStream {

0 commit comments

Comments
 (0)