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:
parent
4d55440e6b
commit
0d2f70ee8c
147 changed files with 788 additions and 1042 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue