refactor(core): derive Copy for DrawMode; drop redundant .clone() calls (M-18)
DrawMode is a fieldless two-variant enum — it is trivially bitwise- copyable. Adding Copy + updating choose_winnable_seed to take the value directly eliminates 13 superfluous .clone() calls across solitaire_core, solitaire_engine, solitaire_assetgen, and solitaire_wasm. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -430,7 +430,7 @@ fn build_home_context<'a>(
|
||||
challenge_best: stats.map_or(0, |s| s.0.challenge_best_score),
|
||||
daily_today,
|
||||
draw_mode: settings
|
||||
.map(|s| s.0.draw_mode.clone())
|
||||
.map(|s| s.0.draw_mode)
|
||||
.unwrap_or(DrawMode::DrawOne),
|
||||
font_res,
|
||||
difficulty_expanded,
|
||||
|
||||
Reference in New Issue
Block a user