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 GitHub
parent 69b1c6d6f5
commit 6825715503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
147 changed files with 788 additions and 1042 deletions

View file

@ -413,13 +413,10 @@ impl LocalBufferStore {
cx: &mut Context<BufferStore>,
) {
cx.subscribe(worktree, |this, worktree, event, cx| {
if worktree.read(cx).is_local() {
match event {
worktree::Event::UpdatedEntries(changes) => {
Self::local_worktree_entries_changed(this, &worktree, changes, cx);
}
_ => {}
}
if worktree.read(cx).is_local()
&& let worktree::Event::UpdatedEntries(changes) = event
{
Self::local_worktree_entries_changed(this, &worktree, changes, cx);
}
})
.detach();
@ -947,10 +944,9 @@ impl BufferStore {
}
pub fn get_by_path(&self, path: &ProjectPath) -> Option<Entity<Buffer>> {
self.path_to_buffer_id.get(path).and_then(|buffer_id| {
let buffer = self.get(*buffer_id);
buffer
})
self.path_to_buffer_id
.get(path)
.and_then(|buffer_id| self.get(*buffer_id))
}
pub fn get(&self, buffer_id: BufferId) -> Option<Entity<Buffer>> {