Handle locales using comma as floating point separator

This commit is contained in:
Matteo Settenvini 2022-08-20 11:18:53 +02:00
parent 5a40313c94
commit 1d5faae1f6
Signed by: matteo
GPG Key ID: 8576CC1AD97D42DF
1 changed files with 1 additions and 0 deletions

View File

@ -216,6 +216,7 @@ impl IngredientVisitor {
E: serde::de::Error,
{
let mut v = value
.replace(',', ".")
.parse::<f64>()
.map_err(|e| serde::de::Error::custom(e.to_string()))?;
let u = match unit.to_lowercase().as_str() {