diff options
Diffstat (limited to 'src/string.rs')
| -rw-r--r-- | src/string.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.rs b/src/string.rs index 78b72a50cb2..cb666fff695 100644 --- a/src/string.rs +++ b/src/string.rs @@ -1,7 +1,7 @@ // Format string literals. use regex::Regex; -use unicode_categories::UnicodeCategories; +use unicode_properties::{GeneralCategory, UnicodeGeneralCategory}; use unicode_segmentation::UnicodeSegmentation; use crate::config::Config; @@ -366,7 +366,7 @@ fn is_whitespace(grapheme: &str) -> bool { fn is_punctuation(grapheme: &str) -> bool { grapheme .chars() - .all(UnicodeCategories::is_punctuation_other) + .all(|c| c.general_category() == GeneralCategory::OtherPunctuation) } fn graphemes_width(graphemes: &[&str]) -> usize { |
