diff --git a/harper-core/src/title_case.rs b/harper-core/src/title_case.rs index beda4e99..76bfb574 100644 --- a/harper-core/src/title_case.rs +++ b/harper-core/src/title_case.rs @@ -180,9 +180,9 @@ mod tests { #[quickcheck] fn a_stays_lowercase(prefix: String, postfix: String) -> TestResult { // There must be words other than the `a`. - if prefix.chars().any(|c| !c.is_alphanumeric()) + if prefix.chars().any(|c| !c.is_ascii_alphanumeric()) || prefix.is_empty() - || postfix.chars().any(|c| !c.is_alphanumeric()) + || postfix.chars().any(|c| !c.is_ascii_alphanumeric()) || postfix.is_empty() { return TestResult::discard(); @@ -204,9 +204,9 @@ mod tests { #[quickcheck] fn about_becomes_uppercase(prefix: String, postfix: String) -> TestResult { // There must be words other than the `a`. - if prefix.chars().any(|c| !c.is_alphanumeric()) + if prefix.chars().any(|c| !c.is_ascii_alphanumeric()) || prefix.is_empty() - || postfix.chars().any(|c| !c.is_alphanumeric()) + || postfix.chars().any(|c| !c.is_ascii_alphanumeric()) || postfix.is_empty() { return TestResult::discard();