style(mcp_client): cargo fmt — multi-line if-else (CI fix for be302ed) #9

Merged
mik-tf merged 2 commits from development_mik_fmt_fix into development 2026-04-25 15:29:41 +00:00
Owner

Summary

Follow-up fix to PR #8 merge (commit be302ed). The original commit had an inline if sanitized == tool_name { None } else { Some(tool_name) } that exceeded rustfmts preferred line length when combined with the field assignment context, causing the format CI check to fail post-merge.

Pure formatting change — no semantic difference.

What changed

cargo fmt reformats the inline branch to multi-line:

// Before
original_name: if sanitized == tool_name { None } else { Some(tool_name) },

// After
original_name: if sanitized == tool_name {
    None
} else {
    Some(tool_name)
},

Verified

  • cargo fmt --check → clean

Risk

  • Blast radius: 1 file, 5 lines, formatting only.
  • Rollback: trivial revert (would just re-introduce the CI failure).

Refs lhumina_code/home#153

Signed-off-by: mik-tf

## Summary Follow-up fix to PR #8 merge (commit `be302ed`). The original commit had an inline `if sanitized == tool_name { None } else { Some(tool_name) }` that exceeded rustfmts preferred line length when combined with the field assignment context, causing the `format` CI check to fail post-merge. Pure formatting change — no semantic difference. ## What changed `cargo fmt` reformats the inline branch to multi-line: ```rust // Before original_name: if sanitized == tool_name { None } else { Some(tool_name) }, // After original_name: if sanitized == tool_name { None } else { Some(tool_name) }, ``` ## Verified - `cargo fmt --check` → clean ## Risk - Blast radius: 1 file, 5 lines, formatting only. - Rollback: trivial revert (would just re-introduce the CI failure). Refs https://forge.ourworld.tf/lhumina_code/home/issues/153 Signed-off-by: mik-tf
style(mcp_client): cargo fmt — multi-line if-else in McpTool builder
Some checks failed
Build and Test / build (push) Failing after 56s
Build and Test / build (pull_request) Failing after 1m14s
f9add73d79
Follow-up to be302ed. The inline `if sanitized == tool_name { None }
else { Some(tool_name) }` exceeded rustfmt's preferred line length when
combined with the field assignment, breaking the `format` CI check.
Reformatted to multi-line per rustfmt's preference. No semantic change.

Refs lhumina_code/home#153

Signed-off-by: mik-tf
fix(mcp_client): add original_name to test sites + sanitize loop clippy
All checks were successful
Build and Test / build (pull_request) Successful in 2m55s
Build and Test / build (push) Successful in 3m32s
5cc3d246dc
Three follow-on issues from be302ed flagged by CI:

1. McpTool gained `original_name: Option<String>` but 13 callsites in
   tool_router.rs and semantic_router.rs (mostly tests and routing
   helpers) still used the old 4-field struct literal. Added
   `original_name: None` to each.

2. clippy::while-let-on-iterator on sanitize_tool_name's
   `while let Some(c) = chars.next()` loop. Replaced with `for c in
   raw.chars()`. Same behavior, removes the unused `peekable()` since
   we never peek.

cargo fmt + cargo clippy --all-targets -- -D warnings + cargo build
--release all clean locally.

Refs lhumina_code/home#153

Signed-off-by: mik-tf
mik-tf merged commit 5bea19b125 into development 2026-04-25 15:29:41 +00:00
mik-tf deleted branch development_mik_fmt_fix 2026-04-25 15:29:41 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_agent!9
No description provided.