style: cargo fmt
Test / test (pull_request) Successful in 37m46s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-07-13 13:11:54 -07:00
parent 560470b86b
commit fc87b13e5b
2 changed files with 38 additions and 18 deletions
+21 -7
View File
@@ -569,9 +569,7 @@ fn build_home_context<'a>(
// additionally requires at least one move — a fresh untouched deal
// is indistinguishable from "New Game" and doesn't earn a card.
let game_live = game.is_some_and(|g| !g.0.is_won());
let continue_info = game
.filter(|g| game_live && g.0.move_count() > 0)
.map(|g| {
let continue_info = game.filter(|g| game_live && g.0.move_count() > 0).map(|g| {
let g = &g.0;
let mut caption = format!(
"{} \u{2022} {}",
@@ -579,7 +577,10 @@ fn build_home_context<'a>(
format_elapsed(g.elapsed_seconds)
);
if g.mode != GameMode::Zen {
caption.push_str(&format!(" \u{2022} Score {}", format_compact(g.score() as u64)));
caption.push_str(&format!(
" \u{2022} Score {}",
format_compact(g.score() as u64)
));
}
ContinueInfo { caption }
});
@@ -1023,7 +1024,12 @@ fn handle_home_digit_keys(
}
if let Some(game_mode) = mode.to_game_mode() {
persist_last_mode(game_mode, &mut settings, storage_path.as_deref(), &mut changed);
persist_last_mode(
game_mode,
&mut settings,
storage_path.as_deref(),
&mut changed,
);
}
writers.dispatch(mode);
@@ -1325,7 +1331,11 @@ fn spawn_new_game_hero(parent: &mut ChildSpawnerCommands, ctx: &HomeContext<'_>)
HighContrastBorder::with_default(BORDER_STRONG),
))
.with_children(|c| {
c.spawn((Text::new("New Game"), font_title.clone(), TextColor(BG_BASE)));
c.spawn((
Text::new("New Game"),
font_title.clone(),
TextColor(BG_BASE),
));
c.spawn((Text::new(caption), font_caption.clone(), TextColor(BG_BASE)));
});
}
@@ -1381,7 +1391,11 @@ fn spawn_daily_callout(parent: &mut ChildSpawnerCommands, ctx: &HomeContext<'_>)
font_label.clone(),
TextColor(TEXT_SECONDARY),
));
c.spawn((Text::new(date_text), font_value.clone(), TextColor(date_color)));
c.spawn((
Text::new(date_text),
font_value.clone(),
TextColor(date_color),
));
if let Some(goal) = today.goal.as_ref() {
c.spawn((
Text::new(format!("Goal: {goal}")),
+7 -1
View File
@@ -181,7 +181,13 @@ pub fn spawn_modal<M: Component, F>(
where
F: FnOnce(&mut ChildSpawnerCommands),
{
spawn_modal_sized(commands, plugin_marker, z_panel, MODAL_CARD_MAX_WIDTH, build_card)
spawn_modal_sized(
commands,
plugin_marker,
z_panel,
MODAL_CARD_MAX_WIDTH,
build_card,
)
}
/// Default maximum card width in logical pixels — every [`spawn_modal`]