Fix some silly clipply

This commit is contained in:
Peter Ammon
2025-03-01 13:27:07 -08:00
parent b8934318f3
commit 692e14ec82

View File

@@ -237,7 +237,7 @@ pub fn wcstod_underscores<Chars>(s: Chars, consumed: &mut usize) -> Result<f64,
}
// Look for characters leading "infinity" or "nan", case-insensitive.
if inf_nan_chars.next().map_or(false, |c| "iInN".contains(c)) {
if matches!(inf_nan_chars.next(), Some('i' | 'I' | 'n' | 'N')) {
// We think it's inf or nan, so use the parser without underscores.
// Note that leading underscores will now trigger an error.
let f = wcstod_inner(chars, '.', consumed)?;