diff options
Diffstat (limited to 'vendor/regex-syntax/src/unicode.rs')
-rw-r--r-- | vendor/regex-syntax/src/unicode.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/regex-syntax/src/unicode.rs b/vendor/regex-syntax/src/unicode.rs index b894c7db2..70d5954b7 100644 --- a/vendor/regex-syntax/src/unicode.rs +++ b/vendor/regex-syntax/src/unicode.rs @@ -99,7 +99,7 @@ pub fn simple_fold( Ok(CASE_FOLDING_SIMPLE .binary_search_by_key(&c, |&(c1, _)| c1) - .map(|i| CASE_FOLDING_SIMPLE[i].1.iter().map(|&c| c)) + .map(|i| CASE_FOLDING_SIMPLE[i].1.iter().copied()) .map_err(|i| { if i >= CASE_FOLDING_SIMPLE.len() { None @@ -580,7 +580,7 @@ fn ages(canonical_age: &str) -> Result<impl Iterator<Item = Range>> { fn imp(canonical_age: &str) -> Result<impl Iterator<Item = Range>> { use crate::unicode_tables::age; - const AGES: &'static [(&'static str, Range)] = &[ + const AGES: &[(&str, Range)] = &[ ("V1_1", age::V1_1), ("V2_0", age::V2_0), ("V2_1", age::V2_1), @@ -604,13 +604,14 @@ fn ages(canonical_age: &str) -> Result<impl Iterator<Item = Range>> { ("V12_0", age::V12_0), ("V12_1", age::V12_1), ("V13_0", age::V13_0), + ("V14_0", age::V14_0), ]; assert_eq!(AGES.len(), age::BY_NAME.len(), "ages are out of sync"); let pos = AGES.iter().position(|&(age, _)| canonical_age == age); match pos { None => Err(Error::PropertyValueNotFound), - Some(i) => Ok(AGES[..i + 1].iter().map(|&(_, classes)| classes)), + Some(i) => Ok(AGES[..=i].iter().map(|&(_, classes)| classes)), } } |