Fix clippy::needless_borrow lint violations (#36444)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-18 23:54:35 +02:00 committed by GitHub
parent eecf142f06
commit 9e0e233319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
242 changed files with 801 additions and 821 deletions

View file

@ -368,7 +368,7 @@ impl ContextServerStore {
}
pub fn restart_server(&mut self, id: &ContextServerId, cx: &mut Context<Self>) -> Result<()> {
if let Some(state) = self.servers.get(&id) {
if let Some(state) = self.servers.get(id) {
let configuration = state.configuration();
self.stop_server(&state.server().id(), cx)?;
@ -397,7 +397,7 @@ impl ContextServerStore {
let server = server.clone();
let configuration = configuration.clone();
async move |this, cx| {
match server.clone().start(&cx).await {
match server.clone().start(cx).await {
Ok(_) => {
log::info!("Started {} context server", id);
debug_assert!(server.client().is_some());
@ -588,7 +588,7 @@ impl ContextServerStore {
for server_id in this.servers.keys() {
// All servers that are not in desired_servers should be removed from the store.
// This can happen if the user removed a server from the context server settings.
if !configured_servers.contains_key(&server_id) {
if !configured_servers.contains_key(server_id) {
if disabled_servers.contains_key(&server_id.0) {
servers_to_stop.insert(server_id.clone());
} else {