Remove if-not-else patterns (#10402)

This commit is contained in:
Joseph T. Lyons 2024-04-11 03:48:06 -04:00 committed by GitHub
parent 36a87d0f5c
commit eb6f7c1240
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 99 additions and 99 deletions

View file

@ -8833,16 +8833,16 @@ impl Editor {
}
pub fn toggle_git_blame(&mut self, _: &ToggleGitBlame, cx: &mut ViewContext<Self>) {
if !self.show_git_blame {
if self.show_git_blame {
self.blame_subscription.take();
self.blame.take();
self.show_git_blame = false
} else {
if let Err(error) = self.show_git_blame_internal(cx) {
log::error!("failed to toggle on 'git blame': {}", error);
return;
}
self.show_git_blame = true
} else {
self.blame_subscription.take();
self.blame.take();
self.show_git_blame = false
}
cx.notify();