refactor(all): use let chains to flatten nested if statements
Replace nested if and if let blocks with combined if statements using let chains. This reduces indentation and improves readability across the project. Co-Authored-By: fiddlerwoaroof/git-smart-commit (gemma-4-31B-it-UD-Q4_K_XL.gguf)
This commit is contained in:
+2
-3
@@ -167,11 +167,10 @@ fn draw(f: &mut Frame, app: &App) {
|
||||
if matches!(app.mode, AppMode::Help) {
|
||||
f.render_widget(HelpWidget::new(app.help_page), size);
|
||||
}
|
||||
if matches!(app.mode, AppMode::ImportWizard) {
|
||||
if let Some(wizard) = &app.wizard {
|
||||
if matches!(app.mode, AppMode::ImportWizard)
|
||||
&& let Some(wizard) = &app.wizard {
|
||||
f.render_widget(ImportWizardWidget::new(wizard), size);
|
||||
}
|
||||
}
|
||||
// ExportPrompt now uses the minibuffer at the bottom bar.
|
||||
if app.is_empty_model() && matches!(app.mode, AppMode::Normal | AppMode::CommandMode { .. }) {
|
||||
draw_welcome(f, main_chunks[1]);
|
||||
|
||||
Reference in New Issue
Block a user