chore: bump edition from 2021 to 2024

This commit is contained in:
2026-03-13 09:13:04 +07:00
parent aa26c9ccba
commit 1d57a2deab
21 changed files with 250 additions and 244 deletions

View File

@@ -225,13 +225,12 @@ impl MaskPattern {
}
// check if the fraction part is valid
if let Some(frac) = frac_part {
if !frac
if let Some(frac) = frac_part
&& !frac
.chars()
.all(|ch| ch.is_ascii_digit() || Some(ch) == *separator)
{
return false;
}
{
return false;
}
true
@@ -255,10 +254,10 @@ impl MaskPattern {
if token.is_sep() {
// If next token is match, it's valid
if let Some(next_token) = tokens.get(pos + 1) {
if next_token.is_match(ch) {
return true;
}
if let Some(next_token) = tokens.get(pos + 1)
&& next_token.is_match(ch)
{
return true;
}
}
}