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
|
@ -503,7 +503,7 @@ impl CodegenAlternative {
|
|||
}
|
||||
}
|
||||
|
||||
let http_client = cx.http_client().clone();
|
||||
let http_client = cx.http_client();
|
||||
let telemetry = self.telemetry.clone();
|
||||
let language_name = {
|
||||
let multibuffer = self.buffer.read(cx);
|
||||
|
|
|
@ -708,7 +708,7 @@ impl CompletionProvider for ContextPickerCompletionProvider {
|
|||
|
||||
let thread_store = self.thread_store.clone();
|
||||
let editor = self.editor.clone();
|
||||
let http_client = workspace.read(cx).client().http_client().clone();
|
||||
let http_client = workspace.read(cx).client().http_client();
|
||||
|
||||
let MentionCompletion { mode, argument, .. } = state;
|
||||
let query = argument.unwrap_or_else(|| "".to_string());
|
||||
|
|
|
@ -193,7 +193,7 @@ impl PickerDelegate for FetchContextPickerDelegate {
|
|||
return;
|
||||
};
|
||||
|
||||
let http_client = workspace.read(cx).client().http_client().clone();
|
||||
let http_client = workspace.read(cx).client().http_client();
|
||||
let url = self.url.clone();
|
||||
cx.spawn_in(window, async move |this, cx| {
|
||||
let text = cx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue