refactor(arap): rustfmt the unit's files, and the write-off's SOURCE line (P4b S7)

No behaviour: the files as rustfmt leaves them after the unit's edits
(the commits before this one were made before the formatter ran), and the
Ledger::write_off spec block cites A-5 alone for the direct write-off
method (A-6 is the hand-entry refusal, not this command).
This commit is contained in:
swaits committed 2026-10-27 12:44:45 -06:00
1 parent f31dd2640b
commit 22cdfcf34b
9 files changed
+75 -50

No files matched your search

+13 -10
View File
@@ -892,10 +892,12 @@ fn a_write_off_is_flagged_for_the_cpa() {
},
);
let want = format!("Write-off awaiting the CPA's note: Invoice {inv}");
let said = server
.iter()
.find(|a| a.title == want)
.unwrap_or_else(|| panic!("the server's list has no {want:?}: {:?}", server.iter().map(|a| &a.title).collect::<Vec<_>>()));
let said = server.iter().find(|a| a.title == want).unwrap_or_else(|| {
panic!(
"the server's list has no {want:?}: {:?}",
server.iter().map(|a| &a.title).collect::<Vec<_>>()
)
});
assert_eq!(said.severity, ledger_package::Severity::Todo);
assert!(said.prompt.contains("wanderbooks"), "{}", said.prompt);
assert!(said.detail.contains("100.00"), "{}", said.detail);
@@ -910,14 +912,15 @@ fn a_write_off_is_flagged_for_the_cpa() {
.attention
.iter()
.find(|a| a.title == want)
.unwrap_or_else(|| panic!("the viewer shows no {want:?}: {:?}", books.attention.iter().map(|a| &a.title).collect::<Vec<_>>()));
.unwrap_or_else(|| {
panic!(
"the viewer shows no {want:?}: {:?}",
books.attention.iter().map(|a| &a.title).collect::<Vec<_>>()
)
});
assert_eq!(shown.target, Some(ledger_gui::nav::Route::Documents));
// The viewer reads the same figures from the journal it replayed.
let st = books
.ledger
.invoice_state(inv, today)
.unwrap()
.unwrap();
let st = books.ledger.invoice_state(inv, today).unwrap().unwrap();
assert_eq!(st.status, ledger_core::DocStatus::WrittenOff);
assert!(books.ledger.get_entry(entry).is_some());
}