Skip to content

fix(shared-context): clear pre-existing clippy -D warnings debt (item B)#149

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/shared-context-clippy-debt
May 16, 2026
Merged

fix(shared-context): clear pre-existing clippy -D warnings debt (item B)#149
hyperpolymath merged 1 commit into
mainfrom
fix/shared-context-clippy-debt

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Clears the ~20 pre-existing cargo clippy --all-targets -- -D warnings lib lints in gitbot-shared-context (item B / broader fleet CI health). All mechanical, idiomatic, no public API or behaviour change.

Verified from shared-context/: cargo build clean, cargo clippy --lib --tests --bins -- -D warnings zero warnings, cargo test 84 passed / 0 failed.

Scope is strictly shared-context/src/ (6 files). shared-context/benches/ is deliberately untouched (its criterion::black_box deprecation is handled within #145). Fully disjoint from #145 — separate PR for independent review.

Refs hyperpolymath/hypatia#252

🤖 Generated with Claude Code

~20 mechanical clippy lib lints in `gitbot-shared-context`, all fixed
idiomatically with no API/behaviour change (verified: build + clippy
--lib --tests --bins -D warnings clean + 84 tests pass):

- context.rs: drop unused `Severity` import; derive `Default` for
  ContextConfig instead of hand-impl.
- reporting.rs: trim unused imports (move test-only `BotId` into the
  test module); `push('\n')`; iterate map `.values()`.
- storage.rs: drop unused `SessionState`; collapse nested ifs;
  `sort_by_key(Reverse(..))`; `#[cfg(test)] Default for MemoryStorage`;
  `#[allow(should_implement_trait)]` + rationale on fallible `default()`.
- bot.rs: `#[allow(should_implement_trait)]` + rationale on
  `from_str` -> Option; remove if/else with identical blocks.
- exclusion_registry.rs: implement real `std::str::FromStr`
  (signature-compatible) + update call sites to `.parse()`;
  `if let Ok(..) = env::var(..)`; collapse nested if.
- registry_guard.rs: collapse nested if; manual `split_once`.

Scope strictly shared-context/src/; benches/ untouched (handled in
#145). Disjoint from #145 — independent PR for separate review.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit 509a964 into main May 16, 2026
21 of 26 checks passed
@hyperpolymath hyperpolymath deleted the fix/shared-context-clippy-debt branch May 16, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant