From 77fe5d08ffc50f21fe245019871ec87c5fccf8c1 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 5 Jan 2026 16:06:18 -0600 Subject: [PATCH] chore: Migrate from unicode-xid to unicode-ident --- Cargo.lock | 2 +- crates/typos/Cargo.toml | 2 +- crates/typos/src/tokens.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d1cd2a2..b521cfa6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1597,7 +1597,7 @@ dependencies = [ "serde", "simdutf8", "snapbox", - "unicode-xid", + "unicode-ident", "winnow", ] diff --git a/crates/typos/Cargo.toml b/crates/typos/Cargo.toml index c04b46b4..81a40843 100644 --- a/crates/typos/Cargo.toml +++ b/crates/typos/Cargo.toml @@ -17,7 +17,7 @@ rustdoc-args = ["--generate-link-to-definition"] [dependencies] winnow = "0.7.13" -unicode-xid = "0.2.6" +unicode-ident = "1.0.19" serde = { version = "1.0", features = ["derive"] } simdutf8 = "0.1.5" itertools = "0.14" diff --git a/crates/typos/src/tokens.rs b/crates/typos/src/tokens.rs index c34fbba0..43213112 100644 --- a/crates/typos/src/tokens.rs +++ b/crates/typos/src/tokens.rs @@ -647,7 +647,7 @@ mod parser { #[inline] fn is_ignore_char(i: impl AsChar + Copy) -> bool { let c = i.as_char(); - !unicode_xid::UnicodeXID::is_xid_continue(c) && + !unicode_ident::is_xid_continue(c) && // See `c_escape` c != '\\' && // See `printf` @@ -659,7 +659,7 @@ mod parser { #[inline] fn is_xid_continue(i: impl AsChar + Copy) -> bool { let c = i.as_char(); - unicode_xid::UnicodeXID::is_xid_continue(c) + unicode_ident::is_xid_continue(c) } #[inline]