Skip to content

Commit

Permalink
Fix boolean value parsing in TABLEDATA to support a mix of case
Browse files Browse the repository at this point in the history
  • Loading branch information
fxpineau committed May 22, 2024
1 parent e844b2b commit 4374929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/impls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ impl Schema {
"0" | "f" | "F" => VOTableValue::Bool(false),
"1" | "t" | "T" => VOTableValue::Bool(true),
_ => {
s.parse::<bool>().map(VOTableValue::Bool).map_err(|_| VOTableError::Custom(
format!("Unable too parse boolean value. Expected: '0', '1', 't', 'f', 'T', 'F' or 'true', 'false'. Actual: '{}'", s))
s.to_lowercase().parse::<bool>().map(VOTableValue::Bool).map_err(|_| VOTableError::Custom(
format!("Unable to parse boolean value. Expected: '0', '1', 't', 'f', 'T', 'F' or 'true', 'false'. Actual: '{}'", s))
)?
}
}
Expand Down

0 comments on commit 4374929

Please sign in to comment.