mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-09 09:59:45 -10:00
style(tui): rustfmt approval_log.rs so the Lint job's fmt check passes
72a5eaf3b (conservative redaction of the served approval summary) landed with two
unformatted hunks in `approval_log.rs` (lines 174 and 255), which fails the
required Lint job at `cargo fmt --all -- --check` before clippy runs. This is the
third formatting-only fix to main in a row (automation_manager.rs and
runtime_api.rs earlier); the cause is commits pushed without running rustfmt.
Formatting only. The file has another writer's uncommitted edits in the shared
working tree, so this commits only the formatted version of the committed
content; those edits are not staged.
Evidence: `cargo fmt --all -- --check` on a clean `git archive origin/main`
export flagged exactly this one file; the formatted copy passes rustfmt --check.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
ee60ebeb56
commit
0484393a0b
1 file changed
+7
-2
@@ -174,7 +174,10 @@ fn safe_path(token: &str, workspace: &Path) -> String {
|
||||
}
|
||||
}
|
||||
if token.starts_with('/') || token.starts_with('~') {
|
||||
let base = token.rsplit('/').find(|part| !part.is_empty()).unwrap_or("");
|
||||
let base = token
|
||||
.rsplit('/')
|
||||
.find(|part| !part.is_empty())
|
||||
.unwrap_or("");
|
||||
return format!(".../{base}");
|
||||
}
|
||||
token.to_string()
|
||||
@@ -255,7 +258,9 @@ fn redact_ask_text(text: &str, workspace: &Path, command: bool) -> Option<String
|
||||
words
|
||||
.iter()
|
||||
.map(|w| {
|
||||
if plain_word(w) || w.chars().all(|c| c.is_alphanumeric() || ".,:;()".contains(c))
|
||||
if plain_word(w)
|
||||
|| w.chars()
|
||||
.all(|c| c.is_alphanumeric() || ".,:;()".contains(c))
|
||||
{
|
||||
safe_path(w, workspace)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user