From ca7f7675535522d295ef0572d3a5019dd731dc62 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 3 Oct 2026 04:50:59 -0400 Subject: [PATCH] M13.1: clippy (history test) Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/tests_history.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/engine/src/tests_history.rs b/crates/engine/src/tests_history.rs index 326c37c0..967c29e3 100644 --- a/crates/engine/src/tests_history.rs +++ b/crates/engine/src/tests_history.rs @@ -46,7 +46,7 @@ fn undo_then_new_step_keeps_a_branch() { let branch: Vec<&Value> = st.iter().filter(|n| n["depth"] == 1).collect(); assert_eq!(branch.len(), 2, "B and C sit on a branch: {st:?}"); // Jump to C on the old branch. - let c = st.iter().filter(|n| n["depth"] == 1).last().unwrap()["index"].as_u64().unwrap(); + let c = st.iter().rfind(|n| n["depth"] == 1).unwrap()["index"].as_u64().unwrap(); let r = s.execute("edit.history.goto", json!({"index": c})).unwrap(); assert_eq!(r["label"], "New Solid", "{r}"); assert_eq!(names(&s), ["C", "B", "A"]);