Skip to content

Commit

Permalink
Replace unicode-xid with unicode-ident crate
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 16, 2022
1 parent 8649302 commit aec2129
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ targets = ["x86_64-unknown-linux-gnu"]
features = ["span-locations"]

[dependencies]
unicode-xid = "0.2.2"
unicode-ident = "1.0"

[dev-dependencies]
quote = { version = "1.0", default_features = false }
Expand Down
5 changes: 2 additions & 3 deletions src/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use std::path::Path;
use std::path::PathBuf;
use std::str::FromStr;
use std::vec;
use unicode_xid::UnicodeXID;

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

pub(crate) fn is_ident_start(c: char) -> bool {
c == '_' || UnicodeXID::is_xid_start(c)
c == '_' || unicode_ident::is_xid_start(c)
}

pub(crate) fn is_ident_continue(c: char) -> bool {
UnicodeXID::is_xid_continue(c)
unicode_ident::is_xid_continue(c)
}

fn validate_ident(string: &str) {
Expand Down

0 comments on commit aec2129

Please sign in to comment.