Fix unnecessary-mut-passed lint (#36490)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 16:20:01 +02:00 committed by GitHub
parent e3b593efbd
commit c4083b9b63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 103 additions and 104 deletions

View file

@ -1613,25 +1613,23 @@ impl Project {
.into_iter()
.map(|s| match s {
EntitySubscription::BufferStore(subscription) => {
subscription.set_entity(&buffer_store, &mut cx)
subscription.set_entity(&buffer_store, &cx)
}
EntitySubscription::WorktreeStore(subscription) => {
subscription.set_entity(&worktree_store, &mut cx)
subscription.set_entity(&worktree_store, &cx)
}
EntitySubscription::GitStore(subscription) => {
subscription.set_entity(&git_store, &mut cx)
subscription.set_entity(&git_store, &cx)
}
EntitySubscription::SettingsObserver(subscription) => {
subscription.set_entity(&settings_observer, &mut cx)
}
EntitySubscription::Project(subscription) => {
subscription.set_entity(&this, &mut cx)
subscription.set_entity(&settings_observer, &cx)
}
EntitySubscription::Project(subscription) => subscription.set_entity(&this, &cx),
EntitySubscription::LspStore(subscription) => {
subscription.set_entity(&lsp_store, &mut cx)
subscription.set_entity(&lsp_store, &cx)
}
EntitySubscription::DapStore(subscription) => {
subscription.set_entity(&dap_store, &mut cx)
subscription.set_entity(&dap_store, &cx)
}
})
.collect::<Vec<_>>();
@ -2226,28 +2224,28 @@ impl Project {
self.client_subscriptions.extend([
self.client
.subscribe_to_entity(project_id)?
.set_entity(&cx.entity(), &mut cx.to_async()),
.set_entity(&cx.entity(), &cx.to_async()),
self.client
.subscribe_to_entity(project_id)?
.set_entity(&self.worktree_store, &mut cx.to_async()),
.set_entity(&self.worktree_store, &cx.to_async()),
self.client
.subscribe_to_entity(project_id)?
.set_entity(&self.buffer_store, &mut cx.to_async()),
.set_entity(&self.buffer_store, &cx.to_async()),
self.client
.subscribe_to_entity(project_id)?
.set_entity(&self.lsp_store, &mut cx.to_async()),
.set_entity(&self.lsp_store, &cx.to_async()),
self.client
.subscribe_to_entity(project_id)?
.set_entity(&self.settings_observer, &mut cx.to_async()),
.set_entity(&self.settings_observer, &cx.to_async()),
self.client
.subscribe_to_entity(project_id)?
.set_entity(&self.dap_store, &mut cx.to_async()),
.set_entity(&self.dap_store, &cx.to_async()),
self.client
.subscribe_to_entity(project_id)?
.set_entity(&self.breakpoint_store, &mut cx.to_async()),
.set_entity(&self.breakpoint_store, &cx.to_async()),
self.client
.subscribe_to_entity(project_id)?
.set_entity(&self.git_store, &mut cx.to_async()),
.set_entity(&self.git_store, &cx.to_async()),
]);
self.buffer_store.update(cx, |buffer_store, cx| {