Skip to content

Commit

Permalink
Merge #608
Browse files Browse the repository at this point in the history
608: Fix documentation of `NoneAsEmptyString` to specify `Display` instead of `AsRef<str>`. r=jonasbb a=jonasbb

As part of #605 the investigation revealed that the documentation of
`NoneAsEmptyString` was wrong. It specified `AsRef<str>` instead of
`Display` as the trait.

bors r+

Co-authored-by: Jonas Bushart <jonas@bushart.org>
  • Loading branch information
bors[bot] and jonasbb authored Jul 1, 2023
2 parents 42a067b + 1be382f commit 167f25c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serde_with/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ pub struct DisplayFromStr;

/// De/Serialize a [`Option<String>`] type while transforming the empty string to [`None`]
///
/// Convert an [`Option<T>`] from/to string using [`FromStr`] and [`AsRef<str>`] implementations.
/// Convert an [`Option<T>`] from/to string using [`FromStr`] and [`Display`] implementations.
/// An empty string is deserialized as [`None`] and a [`None`] vice versa.
///
/// # Examples
Expand Down

0 comments on commit 167f25c

Please sign in to comment.