diff options
| author | Max Heller <max.a.heller@gmail.com> | 2023-08-01 18:18:12 -0400 |
|---|---|---|
| committer | Max Heller <max.a.heller@gmail.com> | 2023-08-01 18:18:12 -0400 |
| commit | a743903cf06dfc8b55cd71840895b453a16cf0ae (patch) | |
| tree | 1ef8bb52077d083ce24bb64442ce20a59c75298d | |
| parent | 91581becac9ec00e25257f469e6905c3fa169cb3 (diff) | |
| download | rust-a743903cf06dfc8b55cd71840895b453a16cf0ae.tar.gz rust-a743903cf06dfc8b55cd71840895b453a16cf0ae.zip | |
remove unicode-ident dependency
| -rw-r--r-- | Cargo.lock | 1 | ||||
| -rw-r--r-- | crates/ide-completion/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/ide-completion/src/item.rs | 4 |
3 files changed, 2 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock index f07c08a77bc..f8806794979 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -715,7 +715,6 @@ dependencies = [ "syntax", "test-utils", "text-edit", - "unicode-ident", ] [[package]] diff --git a/crates/ide-completion/Cargo.toml b/crates/ide-completion/Cargo.toml index c06ac55aae3..092fb303668 100644 --- a/crates/ide-completion/Cargo.toml +++ b/crates/ide-completion/Cargo.toml @@ -17,7 +17,6 @@ itertools = "0.10.5" once_cell = "1.17.0" smallvec.workspace = true -unicode-ident = "1.0.0" # local deps diff --git a/crates/ide-completion/src/item.rs b/crates/ide-completion/src/item.rs index 92782d1e807..0309952c29a 100644 --- a/crates/ide-completion/src/item.rs +++ b/crates/ide-completion/src/item.rs @@ -437,8 +437,8 @@ impl Builder { // `PartialOrd` because it has an alias of ">". .filter(|alias| { let mut chars = alias.chars(); - chars.next().is_some_and(unicode_ident::is_xid_start) - && chars.all(unicode_ident::is_xid_continue) + chars.next().is_some_and(char::is_alphabetic) + && chars.all(|c| c.is_alphanumeric() || c == '_') }) // Deliberately concatenated without separators as adding separators e.g. // `alias1, alias2` results in LSP clients continuing to display the completion even |
