Skip to content

Commit 9f58224

Browse files
crlf0710calebcartwright
authored andcommitted
Update Unicode data to 15.0
1 parent 36af403 commit 9f58224

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ tracing = "0.1.37"
5454
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
5555
unicode-segmentation = "1.9"
5656
unicode-width = "0.1"
57-
unicode_categories = "0.1"
57+
unicode-properties = { version = "0.1", default-features = false, features = ["general-category"] }
5858

5959
rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" }
6060

src/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Format string literals.
22

33
use regex::Regex;
4-
use unicode_categories::UnicodeCategories;
4+
use unicode_properties::{GeneralCategory, UnicodeGeneralCategory};
55
use unicode_segmentation::UnicodeSegmentation;
66

77
use crate::config::Config;
@@ -366,7 +366,7 @@ fn is_whitespace(grapheme: &str) -> bool {
366366
fn is_punctuation(grapheme: &str) -> bool {
367367
grapheme
368368
.chars()
369-
.all(UnicodeCategories::is_punctuation_other)
369+
.all(|c| c.general_category() == GeneralCategory::OtherPunctuation)
370370
}
371371

372372
fn graphemes_width(graphemes: &[&str]) -> usize {

0 commit comments

Comments
 (0)