Skip to content

Commit

Permalink
Handle empty string as None.
Browse files Browse the repository at this point in the history
  • Loading branch information
johanthoren committed Nov 6, 2024
1 parent d3db823 commit 941cf17
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ where
E: serde::de::Error,
{
match value {
"" => Ok(None),
"0" => Ok(Some(false)),
"1" => Ok(Some(true)),
"yes" => Ok(Some(true)),
Expand Down

0 comments on commit 941cf17

Please sign in to comment.