Update Unicode data to 15.0
This commit is contained in:
parent
36af403e6b
commit
9f58224123
24
Cargo.lock
generated
24
Cargo.lock
generated
@ -588,9 +588,9 @@ dependencies = [
|
||||
"toml",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"unicode-properties",
|
||||
"unicode-segmentation",
|
||||
"unicode-width",
|
||||
"unicode_categories",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -852,22 +852,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.9.0"
|
||||
name = "unicode-properties"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
|
||||
checksum = "c7f91c8b21fbbaa18853c3d0801c78f4fc94cdb976699bb03e832e75f7fd22f0"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.9"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
||||
|
||||
[[package]]
|
||||
name = "unicode_categories"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
|
||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
|
@ -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" }
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user