Skip to content

Commit 6969abf

Browse files
bors[bot]jonasbb
andauthored
Merge #484
484: Bump versions to v2.0.0-rc.0 r=jonasbb a=jonasbb bors r+ Co-authored-by: Jonas Bushart <[email protected]>
2 parents 8a51f84 + 9c2923e commit 6969abf

File tree

9 files changed

+39
-35
lines changed

9 files changed

+39
-35
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Add this to your `Cargo.toml`:
3434

3535
```toml
3636
[dependencies.serde_with]
37-
version = "1.14.0"
37+
version = "2.0.0-rc.0"
3838
features = [ "..." ]
3939
```
4040

@@ -158,14 +158,14 @@ Foo {
158158
}
159159
```
160160

161-
[`DisplayFromStr`]: https://docs.rs/serde_with/1.14.0/serde_with/struct.DisplayFromStr.html
162-
[`with_prefix!`]: https://docs.rs/serde_with/1.14.0/serde_with/macro.with_prefix.html
163-
[feature flags]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html
164-
[skip_serializing_none]: https://docs.rs/serde_with/1.14.0/serde_with/attr.skip_serializing_none.html
165-
[StringWithSeparator]: https://docs.rs/serde_with/1.14.0/serde_with/rust/struct.StringWithSeparator.html
166-
[user guide]: https://docs.rs/serde_with/1.14.0/serde_with/guide/index.html
161+
[`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/struct.DisplayFromStr.html
162+
[`with_prefix!`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/macro.with_prefix.html
163+
[feature flags]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html
164+
[skip_serializing_none]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/attr.skip_serializing_none.html
165+
[StringWithSeparator]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/rust/struct.StringWithSeparator.html
166+
[user guide]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/index.html
167167
[with-annotation]: https://serde.rs/field-attrs.html#with
168-
[as-annotation]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html
168+
[as-annotation]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html
169169

170170
## License
171171

serde_with/CHANGELOG.md

Lines changed: 5 additions & 3 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.0-rc.0] - 2022-06-29
11+
1012
### Changed
1113

1214
* Make `#[serde_as]` behave more intuitive on `Option<T>` fields.
@@ -22,21 +24,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2224
* `core::option::Option`, with or without leading `::`
2325

2426
If an existing `default` attribute is detected, the attribute is not applied again.
25-
This behavior can be supressed by using `#[serde_as(no_default)]` or `#[serde_as(as = "Option<S>", no_default)]`.
27+
This behavior can be suppressed by using `#[serde_as(no_default)]` or `#[serde_as(as = "Option<S>", no_default)]`.
2628
* `NoneAsEmptyString` and `string_empty_as_none` use a different serialization bound (#388).
2729

2830
Both types used `AsRef<str>` as the serialization bound.
2931
This is limiting for non-string types like `Option<i32>`.
3032
The deserialization often was already more flexible, due to the `FromStr` bound.
3133

3234
For most std types this should have little impact, as the types implementing `AsRef<str>` mostly implement `Display`, too, such as `String`, `Cow<str>`, or `Rc<str>`.
33-
* Bump MSRV to 1.60. This is required for the optional depedency feature syntax in cargo.
35+
* Bump MSRV to 1.60. This is required for the optional dependency feature syntax in cargo.
3436

3537
### Removed
3638

3739
* Remove old module based conversions.
3840

39-
The newer `serde_as` based conversions are prefered.
41+
The newer `serde_as` based conversions are preferred.
4042

4143
* `seq_display_fromstr`: Use `DisplayFromStr` in combination with your container type:
4244

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 = "1.14.0"
9+
version = "2.0.0-rc.0"
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 = "1.5.2", optional = true}
70+
serde_with_macros = {path = "../serde_with_macros", version = "=2.0.0-rc.0", optional = true}
7171
time_0_3 = {package = "time", version = "~0.3", optional = true, default-features = false}
7272

7373
[dev-dependencies]

serde_with/src/lib.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#![doc(test(attr(warn(rust_2018_idioms))))]
2323
// Not needed for 2018 edition and conflicts with `rust_2018_idioms`
2424
#![doc(test(no_crate_inject))]
25-
#![doc(html_root_url = "https://docs.rs/serde_with/1.14.0")]
25+
#![doc(html_root_url = "https://docs.rs/serde_with/2.0.0-rc.0")]
2626
#![cfg_attr(docsrs, feature(doc_cfg))]
2727
#![allow(
2828
// clippy is broken and shows wrong warnings
@@ -69,7 +69,7 @@
6969
//!
7070
//! ```toml
7171
//! [dependencies.serde_with]
72-
//! version = "1.14.0"
72+
//! version = "2.0.0-rc.0"
7373
//! features = [ "..." ]
7474
//! ```
7575
//!
@@ -248,14 +248,14 @@
248248
//! # }
249249
//! ```
250250
//!
251-
//! [`DisplayFromStr`]: https://docs.rs/serde_with/1.14.0/serde_with/struct.DisplayFromStr.html
252-
//! [`with_prefix!`]: https://docs.rs/serde_with/1.14.0/serde_with/macro.with_prefix.html
253-
//! [feature flags]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html
254-
//! [skip_serializing_none]: https://docs.rs/serde_with/1.14.0/serde_with/attr.skip_serializing_none.html
255-
//! [StringWithSeparator]: https://docs.rs/serde_with/1.14.0/serde_with/rust/struct.StringWithSeparator.html
256-
//! [user guide]: https://docs.rs/serde_with/1.14.0/serde_with/guide/index.html
251+
//! [`DisplayFromStr`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/struct.DisplayFromStr.html
252+
//! [`with_prefix!`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/macro.with_prefix.html
253+
//! [feature flags]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html
254+
//! [skip_serializing_none]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/attr.skip_serializing_none.html
255+
//! [StringWithSeparator]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/rust/struct.StringWithSeparator.html
256+
//! [user guide]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/index.html
257257
//! [with-annotation]: https://serde.rs/field-attrs.html#with
258-
//! [as-annotation]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html
258+
//! [as-annotation]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html
259259
260260
#[cfg(feature = "alloc")]
261261
extern crate alloc;
@@ -396,7 +396,7 @@ pub use serde_with_macros::*;
396396
/// # }
397397
/// ```
398398
///
399-
/// [serde_as]: https://docs.rs/serde_with/1.14.0/serde_with/attr.serde_as.html
399+
/// [serde_as]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/attr.serde_as.html
400400
pub struct As<T: ?Sized>(PhantomData<T>);
401401

402402
impl<T: ?Sized> As<T> {
@@ -853,7 +853,7 @@ pub struct BytesOrString;
853853
/// ```
854854
///
855855
/// [`chrono::Duration`]: ::chrono_0_4::Duration
856-
/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html
856+
/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html
857857
pub struct DurationSeconds<
858858
FORMAT: formats::Format = u64,
859859
STRICTNESS: formats::Strictness = formats::Strict,
@@ -981,7 +981,7 @@ pub struct DurationSeconds<
981981
/// ```
982982
///
983983
/// [`chrono::Duration`]: ::chrono_0_4::Duration
984-
/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html
984+
/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html
985985
pub struct DurationSecondsWithFrac<
986986
FORMAT: formats::Format = f64,
987987
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1177,7 +1177,7 @@ pub struct DurationNanoSecondsWithFrac<
11771177
/// [`SystemTime`]: std::time::SystemTime
11781178
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
11791179
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
1180-
/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html
1180+
/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html
11811181
pub struct TimestampSeconds<
11821182
FORMAT: formats::Format = i64,
11831183
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1315,7 +1315,7 @@ pub struct TimestampSeconds<
13151315
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
13161316
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
13171317
/// [NaiveDateTime]: ::chrono_0_4::NaiveDateTime
1318-
/// [feature flag]: https://docs.rs/serde_with/1.14.0/serde_with/guide/feature_flags/index.html
1318+
/// [feature flag]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/feature_flags/index.html
13191319
pub struct TimestampSecondsWithFrac<
13201320
FORMAT: formats::Format = f64,
13211321
STRICTNESS: formats::Strictness = formats::Strict,

serde_with/tests/version_numbers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Needed to supress a 2021 incompatability warning in the macro generated code
1+
// Needed to suppress a 2021 incompatibility warning in the macro generated code
22
// The non_fmt_panic lint is not yet available on most Rust versions
33
#![allow(unknown_lints, non_fmt_panics)]
44

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.0-rc.0] - 2022-06-29
11+
1012
### Changed
1113

1214
* Make `#[serde_as]` behave more intuitive on `Option<T>` fields.

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 = "1.5.2"
5+
version = "2.0.0-rc.0"
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/1.5.2")]
29+
#![doc(html_root_url = "https://docs.rs/serde_with_macros/2.0.0-rc.0")]
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
@@ -526,8 +526,8 @@ fn field_has_attribute(field: &Field, namespace: &str, name: &str) -> bool {
526526
/// }
527527
/// ```
528528
///
529-
/// [`serde_as`]: https://docs.rs/serde_with/1.14.0/serde_with/guide/index.html
530-
/// [re-exporting `serde_as`]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
529+
/// [`serde_as`]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/index.html
530+
/// [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
531531
#[proc_macro_attribute]
532532
pub fn serde_as(args: TokenStream, input: TokenStream) -> TokenStream {
533533
#[derive(FromMeta)]
@@ -915,7 +915,7 @@ fn has_type_embedded(type_: &Type, embedded_type: &syn::Ident) -> bool {
915915
/// [`Display`]: std::fmt::Display
916916
/// [`FromStr`]: std::str::FromStr
917917
/// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
918-
/// [serde-as-crate]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
918+
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
919919
/// [serde-crate]: https://serde.rs/container-attrs.html#crate
920920
#[proc_macro_derive(DeserializeFromStr, attributes(serde_with))]
921921
pub fn derive_deserialize_fromstr(item: TokenStream) -> TokenStream {
@@ -1027,7 +1027,7 @@ fn deserialize_fromstr(mut input: DeriveInput, serde_with_crate_path: Path) -> T
10271027
/// [`Display`]: std::fmt::Display
10281028
/// [`FromStr`]: std::str::FromStr
10291029
/// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
1030-
/// [serde-as-crate]: https://docs.rs/serde_with/1.14.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
1030+
/// [serde-as-crate]: https://docs.rs/serde_with/2.0.0-rc.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
10311031
/// [serde-crate]: https://serde.rs/container-attrs.html#crate
10321032
#[proc_macro_derive(SerializeDisplay, attributes(serde_with))]
10331033
pub fn derive_serialize_display(item: TokenStream) -> TokenStream {

serde_with_macros/tests/version_numbers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ fn test_changelog() {
1616
fn test_serde_with_dependency() {
1717
version_sync::assert_contains_regex!(
1818
"../serde_with/Cargo.toml",
19-
r#"^serde_with_macros = .*? version = "{version}""#
19+
r#"^serde_with_macros = .*? version = "=?{version}""#
2020
);
2121
}

0 commit comments

Comments
 (0)