zed: Remove unnecessary clones (#29513)

`App::http_client` and `Client::http_client` both return an owned `Arc`
which it clones internally. This means we can remove unnecessary clones
when calling these methods.

Release Notes:

- N/A
This commit is contained in:
tidely 2025-04-28 05:23:37 +03:00 committed by GitHub
parent 609c528ceb
commit f060918b57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 13 additions and 17 deletions

View file

@ -378,7 +378,7 @@ fn main() {
let extension_host_proxy = ExtensionHostProxy::global(cx);
let client = Client::production(cx);
cx.set_http_client(client.http_client().clone());
cx.set_http_client(client.http_client());
let mut languages = LanguageRegistry::new(cx.background_executor().clone());
languages.set_language_server_download_dir(paths::languages_dir().clone());
let languages = Arc::new(languages);

View file

@ -4245,11 +4245,7 @@ mod tests {
project_panel::init(cx);
outline_panel::init(cx);
terminal_view::init(cx);
copilot::copilot_chat::init(
app_state.fs.clone(),
app_state.client.http_client().clone(),
cx,
);
copilot::copilot_chat::init(app_state.fs.clone(), app_state.client.http_client(), cx);
image_viewer::init(cx);
language_model::init(app_state.client.clone(), cx);
language_models::init(