Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

Engine tests: drop the drop() of a closure (clippy drop_non_drop)

Claude6938be39e4e6
diff --git a/crates/engine/src/tests_export.rs b/crates/engine/src/tests_export.rs
index 2f1a05116..23969f505 100644
--- a/crates/engine/src/tests_export.rs
+++ b/crates/engine/src/tests_export.rs
@@ -1038,7 +1038,7 @@ fn same_folder_as_original_refuses_photos_without_a_folder() {
assert_eq!(f["photo"], id.0, "{f}");
assert!(f["error"].as_str().unwrap().contains("no folder on disk"), "{f}");
}
- drop(write);
+ // (`write` borrows `written` until its last use above; a closure has no `Drop` to wait for)
assert!(written.is_empty(), "{written:?}");
// a photo on disk whose folder is gone (moved, an unplugged drive)