Skip to content

Commit

Permalink
treat empty value for a color variable as error
Browse files Browse the repository at this point in the history
  • Loading branch information
nn1ks committed Jun 26, 2020
1 parent 61451e8 commit 0e5e9cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn deserialize_bool<'de, D: Deserializer<'de>>(deserializer: D) -> Result<bool,
fn deserialize_color<'de, D: Deserializer<'de>>(deserializer: D) -> Result<Color, D::Error> {
let string = String::deserialize(deserializer)?;
match string.to_lowercase().as_ref() {
"default" | "" => Ok(Color::Default),
"default" => Ok(Color::Default),
"black" => Ok(Color::Black),
"red" => Ok(Color::Red),
"green" => Ok(Color::Green),
Expand Down

0 comments on commit 0e5e9cc

Please sign in to comment.