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:
parent
609c528ceb
commit
f060918b57
10 changed files with 13 additions and 17 deletions
|
@ -371,7 +371,7 @@ pub fn init(cx: &mut App) -> Arc<AgentAppState> {
|
|||
Project::init_settings(cx);
|
||||
|
||||
let client = Client::production(cx);
|
||||
cx.set_http_client(client.http_client().clone());
|
||||
cx.set_http_client(client.http_client());
|
||||
|
||||
let git_binary_path = None;
|
||||
let fs = Arc::new(RealFs::new(
|
||||
|
@ -411,7 +411,7 @@ pub fn init(cx: &mut App) -> Arc<AgentAppState> {
|
|||
tx.send(Some(options)).log_err();
|
||||
})
|
||||
.detach();
|
||||
let node_runtime = NodeRuntime::new(client.http_client().clone(), rx);
|
||||
let node_runtime = NodeRuntime::new(client.http_client(), rx);
|
||||
|
||||
let extension_host_proxy = ExtensionHostProxy::global(cx);
|
||||
|
||||
|
@ -420,7 +420,7 @@ pub fn init(cx: &mut App) -> Arc<AgentAppState> {
|
|||
language_model::init(client.clone(), cx);
|
||||
language_models::init(user_store.clone(), client.clone(), fs.clone(), cx);
|
||||
languages::init(languages.clone(), node_runtime.clone(), cx);
|
||||
assistant_tools::init(client.http_client().clone(), cx);
|
||||
assistant_tools::init(client.http_client(), cx);
|
||||
context_server::init(cx);
|
||||
prompt_store::init(cx);
|
||||
let stdout_is_a_pty = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue