Use LanguageServerName in more places (#18167)
This pushes the new LanguageServerName type to more places. As both languages and language servers were identified by Arc<str>, it was sometimes hard to tell which was intended. Release Notes: - N/A
This commit is contained in:
parent
743feb98bc
commit
4f227fd3bf
20 changed files with 150 additions and 85 deletions
|
@ -338,7 +338,7 @@ impl PrettierStore {
|
|||
prettier_store
|
||||
.update(cx, |prettier_store, cx| {
|
||||
let name = if is_default {
|
||||
LanguageServerName(Arc::from("prettier (default)"))
|
||||
LanguageServerName("prettier (default)".to_string().into())
|
||||
} else {
|
||||
let worktree_path = worktree_id
|
||||
.and_then(|id| {
|
||||
|
@ -366,7 +366,7 @@ impl PrettierStore {
|
|||
}
|
||||
None => format!("prettier ({})", prettier_dir.display()),
|
||||
};
|
||||
LanguageServerName(Arc::from(name))
|
||||
LanguageServerName(name.into())
|
||||
};
|
||||
cx.emit(PrettierStoreEvent::LanguageServerAdded {
|
||||
new_server_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue