Sitelet https://github.com/jonasbb/serde_with/commit/0f4ca67e1f8fc4679e850f3a566d454fb30953c1
Skip to content

Commit 0f4ca67

Browse files
authored
Update changelog for 3.21.0 (#967)
2 parents c8a1d82 + 7654841 commit 0f4ca67

8 files changed

Lines changed: 55 additions & 32 deletions

File tree

‎Cargo.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0"
1212
readme = "README.md"
1313
repository = "https://github.com/jonasbb/serde_with/"
1414
rust-version = "1.88"
15-
version = "3.20.0"
15+
version = "3.21.0"
1616

1717
[workspace.metadata.release]
1818
consolidate-commits = true

‎README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ Foo::Bytes {
179179
}
180180
```
181181

182-
[`DisplayFromStr`]: https://docs.rs/serde_with/3.20.0/serde_with/struct.DisplayFromStr.html
183-
[`with_prefix!`]: https://docs.rs/serde_with/3.20.0/serde_with/macro.with_prefix.html
184-
[`with_suffix!`]: https://docs.rs/serde_with/3.20.0/serde_with/macro.with_suffix.html
185-
[feature flags]: https://docs.rs/serde_with/3.20.0/serde_with/guide/feature_flags/index.html
186-
[skip_serializing_none]: https://docs.rs/serde_with/3.20.0/serde_with/attr.skip_serializing_none.html
187-
[StringWithSeparator]: https://docs.rs/serde_with/3.20.0/serde_with/struct.StringWithSeparator.html
188-
[user guide]: https://docs.rs/serde_with/3.20.0/serde_with/guide/index.html
182+
[`DisplayFromStr`]: https://docs.rs/serde_with/3.21.0/serde_with/struct.DisplayFromStr.html
183+
[`with_prefix!`]: https://docs.rs/serde_with/3.21.0/serde_with/macro.with_prefix.html
184+
[`with_suffix!`]: https://docs.rs/serde_with/3.21.0/serde_with/macro.with_suffix.html
185+
[feature flags]: https://docs.rs/serde_with/3.21.0/serde_with/guide/feature_flags/index.html
186+
[skip_serializing_none]: https://docs.rs/serde_with/3.21.0/serde_with/attr.skip_serializing_none.html
187+
[StringWithSeparator]: https://docs.rs/serde_with/3.21.0/serde_with/struct.StringWithSeparator.html
188+
[user guide]: https://docs.rs/serde_with/3.21.0/serde_with/guide/index.html
189189
[with-annotation]: https://serde.rs/field-attrs.html#with
190-
[as-annotation]: https://docs.rs/serde_with/3.20.0/serde_with/guide/serde_as/index.html
190+
[as-annotation]: https://docs.rs/serde_with/3.21.0/serde_with/guide/serde_as/index.html
191191

192192
## License
193193

‎serde_with/CHANGELOG.md‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,28 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [3.21.0] - 2026-06-04
11+
12+
### Security
13+
14+
* [GHSA-7gcf-g7xr-8hxj](https://github.com/jonasbb/serde_with/security/advisories/GHSA-7gcf-g7xr-8hxj): KeyValueMap serialization panics on empty sequence or map entries
15+
Bad or attacker controlled values could cause a panic while allocating too large values.
16+
Fixed in #966 by setting a maximum allocation size during the creation of collections like `Vec` or sets.
17+
18+
Thanks to @7thParkk for reporting the issue.
19+
1020
### Added
1121

12-
* Add `NoneAsZero` adapter that maps `Option<NonZero*>` to a plain integer, encoding `None` as `0` (#486)
22+
* Add `NoneAsZero` adapter that maps `Option<NonZero*>` to a plain integer, encoding `None` as `0` by @SAY-5 (#486)
23+
24+
### Changed
25+
26+
* Re-enable link-to-definition on docs.rs (#964)
27+
28+
### Fixed
29+
30+
* Fix some doc links to point to the correct types (#963)
31+
* Re-enable `unused_qualifications` and fix the resulting findings by @lms0806 (#962)
1332

1433
## [3.20.0] - 2026-05-10
1534

‎serde_with/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ schemars_0_9 = { package = "schemars", version = "0.9.0", optional = true, defau
179179
schemars_1 = { package = "schemars", version = "1.0.2", optional = true, default-features = false }
180180
serde_core = { version = "1.0.225", default-features = false, features = ["result"] }
181181
serde_json = { version = "1.0.145", optional = true, default-features = false }
182-
serde_with_macros = { path = "../serde_with_macros", version = "=3.20.0", optional = true }
182+
serde_with_macros = { path = "../serde_with_macros", version = "=3.21.0", optional = true }
183183
smallvec_1 = { package = "smallvec", version = "1", optional = true, default-features = false }
184184
time_0_3 = { package = "time", version = "~0.3.47", optional = true, default-features = false }
185185

‎serde_with/src/lib.rs‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
)))]
2222
// Not needed for 2018 edition and conflicts with `rust_2018_idioms`
2323
#![doc(test(no_crate_inject))]
24-
#![doc(html_root_url = "https://docs.rs/serde_with/3.20.0/")]
24+
#![doc(html_root_url = "https://docs.rs/serde_with/3.21.0/")]
2525
#![cfg_attr(docsrs, feature(doc_cfg))]
2626
#![no_std]
2727

@@ -253,15 +253,15 @@
253253
//! # }
254254
//! ```
255255
//!
256-
//! [`DisplayFromStr`]: https://docs.rs/serde_with/3.20.0/serde_with/struct.DisplayFromStr.html
257-
//! [`with_prefix!`]: https://docs.rs/serde_with/3.20.0/serde_with/macro.with_prefix.html
258-
//! [`with_suffix!`]: https://docs.rs/serde_with/3.20.0/serde_with/macro.with_suffix.html
259-
//! [feature flags]: https://docs.rs/serde_with/3.20.0/serde_with/guide/feature_flags/index.html
260-
//! [skip_serializing_none]: https://docs.rs/serde_with/3.20.0/serde_with/attr.skip_serializing_none.html
261-
//! [StringWithSeparator]: https://docs.rs/serde_with/3.20.0/serde_with/struct.StringWithSeparator.html
262-
//! [user guide]: https://docs.rs/serde_with/3.20.0/serde_with/guide/index.html
256+
//! [`DisplayFromStr`]: https://docs.rs/serde_with/3.21.0/serde_with/struct.DisplayFromStr.html
257+
//! [`with_prefix!`]: https://docs.rs/serde_with/3.21.0/serde_with/macro.with_prefix.html
258+
//! [`with_suffix!`]: https://docs.rs/serde_with/3.21.0/serde_with/macro.with_suffix.html
259+
//! [feature flags]: https://docs.rs/serde_with/3.21.0/serde_with/guide/feature_flags/index.html
260+
//! [skip_serializing_none]: https://docs.rs/serde_with/3.21.0/serde_with/attr.skip_serializing_none.html
261+
//! [StringWithSeparator]: https://docs.rs/serde_with/3.21.0/serde_with/struct.StringWithSeparator.html
262+
//! [user guide]: https://docs.rs/serde_with/3.21.0/serde_with/guide/index.html
263263
//! [with-annotation]: https://serde.rs/field-attrs.html#with
264-
//! [as-annotation]: https://docs.rs/serde_with/3.20.0/serde_with/guide/serde_as/index.html
264+
//! [as-annotation]: https://docs.rs/serde_with/3.21.0/serde_with/guide/serde_as/index.html
265265
266266
#[cfg(feature = "alloc")]
267267
extern crate alloc;
@@ -497,7 +497,7 @@ pub use serde_with_macros::*;
497497
/// # }
498498
/// ```
499499
///
500-
/// [serde_as]: https://docs.rs/serde_with/3.20.0/serde_with/attr.serde_as.html
500+
/// [serde_as]: https://docs.rs/serde_with/3.21.0/serde_with/attr.serde_as.html
501501
pub struct As<T: ?Sized>(PhantomData<T>);
502502

503503
/// Adapter to convert from `serde_as` to the serde traits.
@@ -1025,7 +1025,7 @@ pub struct BytesOrString;
10251025
/// ```
10261026
///
10271027
/// [`chrono::Duration`]: ::chrono_0_4::Duration
1028-
/// [feature flag]: https://docs.rs/serde_with/3.20.0/serde_with/guide/feature_flags/index.html
1028+
/// [feature flag]: https://docs.rs/serde_with/3.21.0/serde_with/guide/feature_flags/index.html
10291029
pub struct DurationSeconds<
10301030
FORMAT: formats::Format = u64,
10311031
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1157,7 +1157,7 @@ pub struct DurationSeconds<
11571157
/// ```
11581158
///
11591159
/// [`chrono::Duration`]: ::chrono_0_4::Duration
1160-
/// [feature flag]: https://docs.rs/serde_with/3.20.0/serde_with/guide/feature_flags/index.html
1160+
/// [feature flag]: https://docs.rs/serde_with/3.21.0/serde_with/guide/feature_flags/index.html
11611161
pub struct DurationSecondsWithFrac<
11621162
FORMAT: formats::Format = f64,
11631163
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1359,7 +1359,7 @@ pub struct DurationNanoSecondsWithFrac<
13591359
/// [`SystemTime`]: std::time::SystemTime
13601360
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
13611361
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
1362-
/// [feature flag]: https://docs.rs/serde_with/3.20.0/serde_with/guide/feature_flags/index.html
1362+
/// [feature flag]: https://docs.rs/serde_with/3.21.0/serde_with/guide/feature_flags/index.html
13631363
pub struct TimestampSeconds<
13641364
FORMAT: formats::Format = i64,
13651365
STRICTNESS: formats::Strictness = formats::Strict,
@@ -1501,7 +1501,7 @@ pub struct TimestampSeconds<
15011501
/// [`chrono::DateTime<Local>`]: ::chrono_0_4::DateTime
15021502
/// [`chrono::DateTime<Utc>`]: ::chrono_0_4::DateTime
15031503
/// [NaiveDateTime]: ::chrono_0_4::NaiveDateTime
1504-
/// [feature flag]: https://docs.rs/serde_with/3.20.0/serde_with/guide/feature_flags/index.html
1504+
/// [feature flag]: https://docs.rs/serde_with/3.21.0/serde_with/guide/feature_flags/index.html
15051505
pub struct TimestampSecondsWithFrac<
15061506
FORMAT: formats::Format = f64,
15071507
STRICTNESS: formats::Strictness = formats::Strict,

‎serde_with_macros/CHANGELOG.md‎

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

88
## [Unreleased]
99

10+
## [3.21.0] - 2026-06-04
11+
12+
No changes.
13+
1014
## [3.20.0] - 2026-05-10
1115

1216
No changes.

‎serde_with_macros/src/lib.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)))]
2121
// Not needed for 2018 edition and conflicts with `rust_2018_idioms`
2222
#![doc(test(no_crate_inject))]
23-
#![doc(html_root_url = "https://docs.rs/serde_with_macros/3.20.0/")]
23+
#![doc(html_root_url = "https://docs.rs/serde_with_macros/3.21.0/")]
2424
// Tarpaulin does not work well with proc macros and marks most of the lines as uncovered.
2525
#![cfg(not(tarpaulin_include))]
2626

@@ -592,8 +592,8 @@ fn field_has_attribute(field: &Field, namespace: &str, name: &str) -> bool {
592592
/// It will also work if the relevant derive is behind a `#[cfg_attr]` attribute
593593
/// and propagate the `#[cfg_attr]` to the various `#[schemars]` field attributes.
594594
///
595-
/// [`serde_as`]: https://docs.rs/serde_with/3.20.0/serde_with/guide/index.html
596-
/// [re-exporting `serde_as`]: https://docs.rs/serde_with/3.20.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
595+
/// [`serde_as`]: https://docs.rs/serde_with/3.21.0/serde_with/guide/index.html
596+
/// [re-exporting `serde_as`]: https://docs.rs/serde_with/3.21.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
597597
#[proc_macro_attribute]
598598
pub fn serde_as(args: TokenStream, input: TokenStream) -> TokenStream {
599599
#[derive(FromMeta)]
@@ -1063,7 +1063,7 @@ fn has_type_embedded(type_: &Type, embedded_type: &syn::Ident) -> bool {
10631063
/// [`Display`]: std::fmt::Display
10641064
/// [`FromStr`]: std::str::FromStr
10651065
/// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
1066-
/// [serde-as-crate]: https://docs.rs/serde_with/3.20.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
1066+
/// [serde-as-crate]: https://docs.rs/serde_with/3.21.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
10671067
/// [serde-crate]: https://serde.rs/container-attrs.html#crate
10681068
#[proc_macro_derive(DeserializeFromStr, attributes(serde_with))]
10691069
pub fn derive_deserialize_fromstr(item: TokenStream) -> TokenStream {
@@ -1183,7 +1183,7 @@ fn deserialize_fromstr(mut input: DeriveInput, serde_with_crate_path: Path) -> T
11831183
/// [`Display`]: std::fmt::Display
11841184
/// [`FromStr`]: std::str::FromStr
11851185
/// [cargo-toml-rename]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
1186-
/// [serde-as-crate]: https://docs.rs/serde_with/3.20.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
1186+
/// [serde-as-crate]: https://docs.rs/serde_with/3.21.0/serde_with/guide/serde_as/index.html#re-exporting-serde_as
11871187
/// [serde-crate]: https://serde.rs/container-attrs.html#crate
11881188
#[proc_macro_derive(SerializeDisplay, attributes(serde_with))]
11891189
pub fn derive_serialize_display(item: TokenStream) -> TokenStream {

0 commit comments

Comments
 (0)