Skip to content

Commit aec2129

Browse files
committed
Replace unicode-xid with unicode-ident crate
1 parent 8649302 commit aec2129

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ targets = ["x86_64-unknown-linux-gnu"]
2525
features = ["span-locations"]
2626

2727
[dependencies]
28-
unicode-xid = "0.2.2"
28+
unicode-ident = "1.0"
2929

3030
[dev-dependencies]
3131
quote = { version = "1.0", default_features = false }

src/fallback.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use std::path::Path;
1313
use std::path::PathBuf;
1414
use std::str::FromStr;
1515
use std::vec;
16-
use unicode_xid::UnicodeXID;
1716

1817
/// Force use of proc-macro2's fallback implementation of the API for now, even
1918
/// if the compiler's implementation is available.
@@ -666,11 +665,11 @@ impl Ident {
666665
}
667666

668667
pub(crate) fn is_ident_start(c: char) -> bool {
669-
c == '_' || UnicodeXID::is_xid_start(c)
668+
c == '_' || unicode_ident::is_xid_start(c)
670669
}
671670

672671
pub(crate) fn is_ident_continue(c: char) -> bool {
673-
UnicodeXID::is_xid_continue(c)
672+
unicode_ident::is_xid_continue(c)
674673
}
675674

676675
fn validate_ident(string: &str) {

0 commit comments

Comments
 (0)