desk, import: pass fn item to map, is_multiple_of, drop format! of a literal (clippy)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e6d8f33b41
commit
50b978cd8b
2 changed files with 3 additions and 3 deletions
|
|
@ -1468,7 +1468,7 @@ mod tests {
|
|||
let before = head(&mind);
|
||||
let id = request.request_id.clone();
|
||||
let (answer, outcome) = stored(ask(&mut mind, &decider("y"), request.clone()));
|
||||
assert_eq!(outcome, DeskOutcome::Refused { code: DeskRefusal::BadRetraction, retracts: sent.2.map(|target| s(target)) }, "{what}");
|
||||
assert_eq!(outcome, DeskOutcome::Refused { code: DeskRefusal::BadRetraction, retracts: sent.2.map(s) }, "{what}");
|
||||
assert_eq!(head(&mind), before + 1, "{what} is stored");
|
||||
// The record keeps what was sent: the choice, the note and the target it named.
|
||||
let record = held(&mind, &answer);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ mod tests {
|
|||
fn view(document: PipelineDocument, ordinal: u64) -> PipelineDocumentView {
|
||||
let key = pipeline_key(&document).unwrap();
|
||||
let id = PipelineRef { kind: document.kind(), id: s(&key) };
|
||||
let faculty = if ordinal % 2 == 0 { Faculty::Hands } else { Faculty::Soul };
|
||||
let faculty = if ordinal.is_multiple_of(2) { Faculty::Hands } else { Faculty::Soul };
|
||||
let admission = AdmissionFacts {
|
||||
receipt_id: format!("receipt-{ordinal}"),
|
||||
admitted_at: format!("2026-11-08T16:{ordinal:02}:00Z"),
|
||||
|
|
@ -226,7 +226,7 @@ mod tests {
|
|||
let to_source = [held.clone(), vec![moved(RECEIVER, 4)]].concat();
|
||||
assert_eq!(plan(&slug(CAMPAIGN), &slug(RECEIVER), &slug(RECEIVER), to_source), Err(ImportFault::SourceIsReceiver));
|
||||
let other_root = view(
|
||||
resolution(r(K::Campaign, &format!("elsewhere:campaign:self")), ResolutionOutcome::Moved { to: slug(RECEIVER) }),
|
||||
resolution(r(K::Campaign, "elsewhere:campaign:self"), ResolutionOutcome::Moved { to: slug(RECEIVER) }),
|
||||
4,
|
||||
);
|
||||
assert_eq!(plan_of([held, vec![other_root]].concat()), Err(ImportFault::NotMoved), "another root's move does not move this one");
|
||||
|
|
|
|||
Loading…
Reference in a new issue