Handle locales using comma as floating point separator
This commit is contained in:
parent
5a40313c94
commit
1d5faae1f6
|
@ -216,6 +216,7 @@ impl IngredientVisitor {
|
||||||
E: serde::de::Error,
|
E: serde::de::Error,
|
||||||
{
|
{
|
||||||
let mut v = value
|
let mut v = value
|
||||||
|
.replace(',', ".")
|
||||||
.parse::<f64>()
|
.parse::<f64>()
|
||||||
.map_err(|e| serde::de::Error::custom(e.to_string()))?;
|
.map_err(|e| serde::de::Error::custom(e.to_string()))?;
|
||||||
let u = match unit.to_lowercase().as_str() {
|
let u = match unit.to_lowercase().as_str() {
|
||||||
|
|
Loading…
Reference in New Issue