fix(engine): resolve all clippy warnings introduced by PNG asset pipeline
- Collapse nested-if patterns into let-chains across 13 plugins (42 instances) - Add #[allow(clippy::too_many_arguments)] to 5 Bevy systems in card_plugin and input_plugin where ECS parameter count exceeds the lint threshold - Gate Theme import in table_plugin under #[cfg(test)] — only used by test-only colour helpers; removing the unconditional import silences the unused-import lint without breaking the test suite - Wrap ButtonInput<MouseButton> in Option<> in update_input_platform so that tests using MinimalPlugins (no InputPlugin) no longer panic on startup All 789 tests pass; cargo clippy --workspace -- -D warnings is clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -161,27 +161,24 @@ fn handle_daily_completion(
|
||||
continue;
|
||||
}
|
||||
// Enforce server-supplied goal constraints when present.
|
||||
if let Some(target) = daily.target_score {
|
||||
if ev.score < target {
|
||||
if let Some(target) = daily.target_score
|
||||
&& ev.score < target {
|
||||
continue; // score goal not met
|
||||
}
|
||||
}
|
||||
if let Some(max_secs) = daily.max_time_secs {
|
||||
if ev.time_seconds > max_secs {
|
||||
if let Some(max_secs) = daily.max_time_secs
|
||||
&& ev.time_seconds > max_secs {
|
||||
continue; // time limit exceeded
|
||||
}
|
||||
}
|
||||
if !progress.0.record_daily_completion(daily.date) {
|
||||
// Already counted today — no-op.
|
||||
continue;
|
||||
}
|
||||
progress.0.add_xp(DAILY_BONUS_XP);
|
||||
xp_awarded.write(XpAwardedEvent { amount: DAILY_BONUS_XP });
|
||||
if let Some(target) = &path.0 {
|
||||
if let Err(e) = save_progress_to(target, &progress.0) {
|
||||
if let Some(target) = &path.0
|
||||
&& let Err(e) = save_progress_to(target, &progress.0) {
|
||||
warn!("failed to save progress after daily completion: {e}");
|
||||
}
|
||||
}
|
||||
completed.write(DailyChallengeCompletedEvent {
|
||||
date: daily.date,
|
||||
streak: progress.0.daily_challenge_streak,
|
||||
|
||||
Reference in New Issue
Block a user