Unnamed repository; edit this file 'description' to name the repository.
Replace unicode-general-category with icu-properties (#10989)
Kirawi 2024-06-18
parent 0edf609 · commit 9b7dffb
-rw-r--r--Cargo.lock8
-rw-r--r--helix-core/Cargo.toml2
-rw-r--r--helix-core/src/chars.rs4
-rw-r--r--helix-core/src/lib.rs2
4 files changed, 5 insertions, 11 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c2f2735d..1e4300a0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1319,6 +1319,7 @@ dependencies = [
"hashbrown 0.14.5",
"helix-loader",
"helix-stdx",
+ "icu_properties",
"imara-diff",
"indoc",
"log",
@@ -1336,7 +1337,6 @@ dependencies = [
"textwrap",
"toml",
"tree-sitter",
- "unicode-general-category",
"unicode-segmentation",
"unicode-width",
]
@@ -2665,12 +2665,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552"
[[package]]
-name = "unicode-general-category"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7"
-
-[[package]]
name = "unicode-ident"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml
index 53d4af35..9f936697 100644
--- a/helix-core/Cargo.toml
+++ b/helix-core/Cargo.toml
@@ -24,7 +24,7 @@ smallvec = "1.13"
smartstring = "1.0.1"
unicode-segmentation = "1.11"
unicode-width = "0.1"
-unicode-general-category = "0.6"
+icu_properties = "1.5"
slotmap.workspace = true
tree-sitter.workspace = true
once_cell = "1.19"
diff --git a/helix-core/src/chars.rs b/helix-core/src/chars.rs
index 817bbb86..22050069 100644
--- a/helix-core/src/chars.rs
+++ b/helix-core/src/chars.rs
@@ -63,10 +63,10 @@ pub fn char_is_whitespace(ch: char) -> bool {
#[inline]
pub fn char_is_punctuation(ch: char) -> bool {
- use unicode_general_category::{get_general_category, GeneralCategory};
+ use icu_properties::{maps::general_category, GeneralCategory};
matches!(
- get_general_category(ch),
+ general_category().get(ch),
GeneralCategory::OtherPunctuation
| GeneralCategory::OpenPunctuation
| GeneralCategory::ClosePunctuation
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index 1abd90d1..6b9d359c 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -30,7 +30,7 @@ mod transaction;
pub mod wrap;
pub mod unicode {
- pub use unicode_general_category as category;
+ pub use icu_properties as properties;
pub use unicode_segmentation as segmentation;
pub use unicode_width as width;
}