relayburn: mechanical Rust cleanup (clippy + dedup + dead code)#330
relayburn: mechanical Rust cleanup (clippy + dedup + dead code)#330willwashburn merged 1 commit intomainfrom
Conversation
Pure cleanup, no behavior change. Drops the workspace clippy warning
count from 28 to 17 and removes ~90 LOC of duplication and dead code.
- relayburn-cli: replace `io::Error::new(io::ErrorKind::Other, e)` with
`io::Error::other(e)` (×6 in render/error.rs, render/json.rs,
commands/overhead.rs).
- relayburn-cli: collapse redundant `Ok(Ledger::open(opts)?)` to plain
`Ledger::open(opts)` in commands/{ingest,mcp_server}.rs (the SDK verb
already returns `anyhow::Result`).
- relayburn-cli: `Some(n) if n == 0` → `Some(0)`, `% 3 == 0` →
`.is_multiple_of(3)` in commands/{ingest,overhead}.rs.
- relayburn-sdk: `t.files_touched.as_ref().map(|v| v.as_slice())` →
`.as_deref()` in reader/claude.rs.
- relayburn-sdk: consolidate four byte-identical copies of
`format_with_commas` (findings, tool_call_patterns, tool_output_bloat,
ghost_surface) into a new `analyze::util` module.
- relayburn-sdk: delete `lookup_content_fingerprint` from
ledger/reader.rs — `#[allow(dead_code)]` and confirmed unused.
- relayburn-cli: delete `not_yet_implemented` from commands/mod.rs —
`#[allow(dead_code)]` and not called now that all Wave 2 D1–D8
presenters have landed.
- relayburn-sdk: drop incorrect `#[allow(dead_code)]` on
`writer::debug_now` — it IS called from ledger.rs (twice).
- relayburn-cli: drop the stale `#[allow(dead_code)]` on `GlobalArgs`
now that Wave 2 consumes both `ledger_path` and `no_color`.
This is the lowest-risk slice of a larger Rust review punch list
(perf wins, async hygiene, SQL filter pushdown, env-var removal, etc.) —
those land separately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (16)
💤 Files with no reviewable changes (4)
📝 WalkthroughWalkthroughThis PR consolidates the ChangesCLI Consolidation
SDK Utility Extraction
Error & Code Cleanup
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Mechanical Rust cleanup. No behavior change — pure cleanup that drops the workspace clippy warning count from 28 → 17 and removes ~90 LOC of duplication and dead code.
io::Error::new(io::ErrorKind::Other, e)withio::Error::other(e)(×6).Ok(Ledger::open(opts)?)wrapping (×2).Some(0),.is_multiple_of(3),.as_deref().format_with_commas(findings, tool_call_patterns, tool_output_bloat, ghost_surface) into a newanalyze::utilmodule.ledger::reader::lookup_content_fingerprintandcommands::not_yet_implemented.#[allow(dead_code)]onwriter::debug_now— it IS called fromledger.rs.GlobalArgsclippy allow now that Wave 2 D1–D8 consumes bothledger_pathandno_color.This is the lowest-risk slice of a larger Rust review punch list (perf wins, async hygiene, SQL filter pushdown,
std::env::set_varremoval, date-math consolidation) — those land separately.Test plan
cargo build --workspace --all-targetscleancargo test --workspacepasses (729 tests, 0 failures)cargo clippy --workspace --all-targetswarning count drops from 28 → 17🤖 Generated with Claude Code