Enable clippy::option_map_unit_fn
(#8751)
This PR enables the [`clippy::option_map_unit_fn`](https://rust-lang.github.io/rust-clippy/master/index.html#/option_map_unit_fn) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
d19957b705
commit
ea68f86476
8 changed files with 75 additions and 55 deletions
|
@ -657,9 +657,9 @@ impl SemanticIndex {
|
|||
if register.await.log_err().is_none() {
|
||||
// Stop tracking this worktree if the registration failed.
|
||||
this.update(&mut cx, |this, _| {
|
||||
this.projects.get_mut(&project).map(|project_state| {
|
||||
if let Some(project_state) = this.projects.get_mut(&project) {
|
||||
project_state.worktrees.remove(&worktree_id);
|
||||
});
|
||||
}
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue