chore: clippy clean across the workspace, all targets
Zero warnings from `cargo clippy --workspace --all-targets`, which is now a hard rule rather than "clean except pre-existing": - ChartOfAccounts::add takes the Account it registers instead of eight loose parameters (too_many_arguments); Ledger::add_account builds it. Same validation, same errors. - close_period tool: collapse the nested if-let into a let chain. - iif.rs docs: the IIF layout example shows tabs as `\t` instead of literal tab characters (tabs_in_doc_comments). - Tests: drop an unused binding; assert! instead of assert_eq! against a literal bool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MtYEaR6M6Ybdhm6X98BWNu
This commit is contained in:
1 parent
03212265ce
commit
42e600bbf2
7 files changed
+37
-56
No files matched your search
@@ -1893,17 +1893,17 @@ impl BooksServer {
|
||||
let closing = store.close_period(p.period_id).map_err(|e| e.to_string())?;
|
||||
// Build line descriptions from the posted closing entry.
|
||||
let mut lines = Vec::new();
|
||||
if let Some(eid) = closing {
|
||||
if let Some(entry) = store.ledger().get_entry(eid) {
|
||||
for line in entry.lines() {
|
||||
let code = store
|
||||
.ledger()
|
||||
.chart()
|
||||
.get(line.account)
|
||||
.map(|a| a.code.clone())
|
||||
.unwrap_or_default();
|
||||
lines.push(format!("{:?} {} {}", line.side, code, line.amount.amount));
|
||||
}
|
||||
if let Some(eid) = closing
|
||||
&& let Some(entry) = store.ledger().get_entry(eid)
|
||||
{
|
||||
for line in entry.lines() {
|
||||
let code = store
|
||||
.ledger()
|
||||
.chart()
|
||||
.get(line.account)
|
||||
.map(|a| a.code.clone())
|
||||
.unwrap_or_default();
|
||||
lines.push(format!("{:?} {} {}", line.side, code, line.amount.amount));
|
||||
}
|
||||
}
|
||||
Ok(Json(ClosePeriodOut {
|
||||
|
||||
@@ -688,7 +688,7 @@ fn mcp_resources_over_stdio() {
|
||||
);
|
||||
assert_eq!(init["result"]["serverInfo"]["name"], "wanderbooks");
|
||||
// Resources are advertised.
|
||||
assert_eq!(init["result"]["capabilities"]["resources"].is_null(), false);
|
||||
assert!(!init["result"]["capabilities"]["resources"].is_null());
|
||||
mcp.notify("notifications/initialized");
|
||||
|
||||
mcp.call(
|
||||
|
||||
Reference in new issue
Block a user