Enable clippy::clone_on_copy
(#8728)
This PR enables the [`clippy::clone_on_copy`](https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_copy) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
5935681c5c
commit
9735912965
42 changed files with 144 additions and 160 deletions
|
@ -1483,7 +1483,7 @@ impl Conversation {
|
|||
max_token_count: tiktoken_rs::model::get_context_size(&model.full_name()),
|
||||
pending_token_count: Task::ready(None),
|
||||
api_url: Some(api_url),
|
||||
model: model.clone(),
|
||||
model,
|
||||
_subscriptions: vec![cx.subscribe(&buffer, Self::handle_buffer_event)],
|
||||
pending_save: Task::ready(Ok(())),
|
||||
path: None,
|
||||
|
@ -1527,7 +1527,7 @@ impl Conversation {
|
|||
.as_ref()
|
||||
.map(|summary| summary.text.clone())
|
||||
.unwrap_or_default(),
|
||||
model: self.model.clone(),
|
||||
model: self.model,
|
||||
api_url: self.api_url.clone(),
|
||||
}
|
||||
}
|
||||
|
@ -1652,7 +1652,7 @@ impl Conversation {
|
|||
})
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
let model = self.model.clone();
|
||||
let model = self.model;
|
||||
self.pending_token_count = cx.spawn(|this, mut cx| {
|
||||
async move {
|
||||
cx.background_executor()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue