Add note about non-ASCII decimal_sep length

This commit is contained in:
Mahmoud Al-Qudsi 2024-06-19 18:50:24 -05:00
parent 28a3ae7a8b
commit 32a5be52e1

View file

@ -56,7 +56,9 @@ where
}
}
let res = s.parse::<f64>().ok()?;
*consumed = s.len(); // note this is the number of chars because only ASCII is recognized.
// Note: this is the number of chars because only ASCII is recognized.
// XXX: This assumption only holds if decimal_sep is also ASCII!
*consumed = s.len();
Some(res)
}