Another batch of lint fixes (#36521)

- **Enable a bunch of extra lints**
- **First batch of fixes**
- **More fixes**

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 22:33:44 +02:00 committed by Orual
parent 4d55440e6b
commit 0d2f70ee8c
No known key found for this signature in database
147 changed files with 788 additions and 1042 deletions

View file

@ -446,15 +446,12 @@ impl ImageStore {
event: &ImageItemEvent,
cx: &mut Context<Self>,
) {
match event {
ImageItemEvent::FileHandleChanged => {
if let Some(local) = self.state.as_local() {
local.update(cx, |local, cx| {
local.image_changed_file(image, cx);
})
}
}
_ => {}
if let ImageItemEvent::FileHandleChanged = event
&& let Some(local) = self.state.as_local()
{
local.update(cx, |local, cx| {
local.image_changed_file(image, cx);
})
}
}
}
@ -531,13 +528,10 @@ impl ImageStoreImpl for Entity<LocalImageStore> {
impl LocalImageStore {
fn subscribe_to_worktree(&mut self, worktree: &Entity<Worktree>, cx: &mut Context<Self>) {
cx.subscribe(worktree, |this, worktree, event, cx| {
if worktree.read(cx).is_local() {
match event {
worktree::Event::UpdatedEntries(changes) => {
this.local_worktree_entries_changed(&worktree, changes, cx);
}
_ => {}
}
if worktree.read(cx).is_local()
&& let worktree::Event::UpdatedEntries(changes) = event
{
this.local_worktree_entries_changed(&worktree, changes, cx);
}
})
.detach();