Skip to content

Commit 3159237

Browse files
unhappychoiceclaude
andcommitted
fix: resolve clippy warnings and formatting issues
- Simplify match patterns as suggested by clippy - Use if let instead of match for single pattern matching - Apply rustfmt formatting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bf00265 commit 3159237

File tree

2 files changed

+7
-21
lines changed

2 files changed

+7
-21
lines changed

src/game/screens/result_screen.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,11 +481,7 @@ impl ResultScreen {
481481
}
482482

483483
// Display options
484-
let options = [
485-
"[S] Share Result",
486-
"[T] Back to Title",
487-
"[ESC] Quit",
488-
];
484+
let options = ["[S] Share Result", "[T] Back to Title", "[ESC] Quit"];
489485

490486
let options_start = if !stage_engines.is_empty() {
491487
let stage_results_start_row = summary_start_row + summary_lines.len() as u16 + 2;

src/game/stage_manager.rs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,9 @@ impl StageManager {
212212
}
213213

214214
// Show brief result and auto-advance
215-
if let Some(action) = self.show_stage_completion(&metrics)? {
216-
match action {
217-
ResultAction::Quit => {
218-
// Treat as failed - show fail result screen and handle navigation
219-
return self.handle_fail_result_navigation();
220-
}
221-
_ => {}
222-
}
215+
if let Some(ResultAction::Quit) = self.show_stage_completion(&metrics)? {
216+
// Treat as failed - show fail result screen and handle navigation
217+
return self.handle_fail_result_navigation();
223218
}
224219

225220
// Move to next stage
@@ -239,14 +234,9 @@ impl StageManager {
239234
}
240235
}
241236

242-
if let Some(action) = self.show_stage_completion(&metrics)? {
243-
match action {
244-
ResultAction::Quit => {
245-
// Treat as failed - show fail result screen and handle navigation
246-
return self.handle_fail_result_navigation();
247-
}
248-
_ => {}
249-
}
237+
if let Some(ResultAction::Quit) = self.show_stage_completion(&metrics)? {
238+
// Treat as failed - show fail result screen and handle navigation
239+
return self.handle_fail_result_navigation();
250240
}
251241

252242
// Generate a new challenge for the current stage

0 commit comments

Comments
 (0)