diff options
| author | Caleb Cartwright <caleb.cartwright@outlook.com> | 2023-10-22 12:45:06 -0500 |
|---|---|---|
| committer | Caleb Cartwright <caleb.cartwright@outlook.com> | 2023-10-22 12:45:06 -0500 |
| commit | f35f25287fea7d45cb05764e5d8b0a3a4e4ab2cd (patch) | |
| tree | bd7f33be19074b7fe3bfe4431645078cb73b1951 /src/string.rs | |
| parent | 4b5ef37e217d98de6ea3cef71aea9f47c2e9ce23 (diff) | |
| parent | 547577fa5d309d90292ca3a58fef1bf0d9325cc0 (diff) | |
| download | rust-f35f25287fea7d45cb05764e5d8b0a3a4e4ab2cd.tar.gz rust-f35f25287fea7d45cb05764e5d8b0a3a4e4ab2cd.zip | |
Merge remote-tracking branch 'upstream/master' into subtree-sync-2023-10-22
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 { |
