From de5a39c0fb2ba6a761cc5b701c58e910e520dda7 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Thu, 15 Oct 2026 21:19:33 +0800 Subject: [PATCH] Give the formatter the lines it had been asking for `cargo fmt --all --check` had opinions about three call sites that were already wide enough to need breaking, and the incoming Windows work touches all three files. Split off so the commits after this one contain only the changes they are about. --- crates/squid-cli/src/main.rs | 11 +++++++++-- crates/squid-tui/src/app.rs | 5 ++++- crates/squid-tui/src/views.rs | 5 ++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/crates/squid-cli/src/main.rs b/crates/squid-cli/src/main.rs index a5f0cee..c437549 100644 --- a/crates/squid-cli/src/main.rs +++ b/crates/squid-cli/src/main.rs @@ -722,7 +722,10 @@ fn empty_summary(mode: DeleteMode) -> CleanSummary { fn mode_note(mode: DeleteMode) -> String { match mode { DeleteMode::Trash => { - format!("everything goes to the {} first — squid undo puts it back", bin()) + format!( + "everything goes to the {} first — squid undo puts it back", + bin() + ) } DeleteMode::Permanent => format!("permanent deletion: no {}, no undo", bin()), } @@ -1359,7 +1362,11 @@ fn cmd_history(args: HistoryArgs, json: bool) -> Result { ), paint( "90", - &format!("{}{}", fit(&mode_label(session), mode_col_width()), failures) + &format!( + "{}{}", + fit(&mode_label(session), mode_col_width()), + failures + ) ), paint("90", &shrink(&session.id, 18)) ); diff --git a/crates/squid-tui/src/app.rs b/crates/squid-tui/src/app.rs index 28e0a95..dcb130e 100644 --- a/crates/squid-tui/src/app.rs +++ b/crates/squid-tui/src/app.rs @@ -1686,7 +1686,10 @@ impl App { Some(session) => vec![ format!("{} · {}", session.command, session.freed().human_long()), self.strings.t( - &format!("{} items will come back from {{bin}}", session.entries.len()), + &format!( + "{} items will come back from {{bin}}", + session.entries.len() + ), &format!("{} 项将从{{bin}}还原", session.entries.len()), ), ], diff --git a/crates/squid-tui/src/views.rs b/crates/squid-tui/src/views.rs index 1984a16..a4bcf89 100644 --- a/crates/squid-tui/src/views.rs +++ b/crates/squid-tui/src/views.rs @@ -1788,7 +1788,10 @@ fn draw_help(frame: &mut Frame, area: Rect, app: &App) { "d".to_string(), s.t("clean what is checked", "清理已勾选项"), ), - ("m".to_string(), s.bin_t("{bin} ⇄ permanent", "{bin} ⇄ 永久")), + ( + "m".to_string(), + s.bin_t("{bin} ⇄ permanent", "{bin} ⇄ 永久"), + ), ( "u".to_string(), s.bin_t("restore last {bin} session", "还原上次{bin}会话"),