Skip to content

Commit

Permalink
Update Unicode data to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
crlf0710 committed Jul 29, 2023
1 parent cdfa2f8 commit f5f75b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
unicode-segmentation = "1.9"
unicode-width = "0.1"
unicode_categories = "0.1"
unicode-properties = { version = "0.1", default-features = false, features = ["general-category"] }

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

Expand Down
4 changes: 2 additions & 2 deletions src/string.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f5f75b8

Please sign in to comment.