mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-19 02:10:25 -05:00
Engine tests: drop the drop() of a closure (clippy drop_non_drop)
Clippy 1.97 rejects `drop(write)` in the same-folder export test: the closure has no Drop, so its borrow of `written` already ends at its last use and the call did nothing. Removed, with a note on why the following read of `written` compiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J2NDVXA8jQQWeJb4YVTb6b
This commit is contained in:
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user