diff --git a/apps/vectorcraft-web/src/file_drops.rs b/apps/vectorcraft-web/src/file_drops.rs index 8c3fe8e539..1b98d7b57b 100644 --- a/apps/vectorcraft-web/src/file_drops.rs +++ b/apps/vectorcraft-web/src/file_drops.rs @@ -78,9 +78,10 @@ mod tests { ctx.run_ui(next, |ui| delivered.extend(drops.take(ui.ctx(), &position))).textures_delta.clear(); assert_eq!(shared_files.load(Ordering::Relaxed), 0, "the shared router must not see browser-owned drops"); - let [batch] = delivered.as_slice() else { panic!("the browser UI must receive exactly one batch") }; - let [file] = batch.files.as_slice() else { panic!("the browser UI must receive exactly one file") }; - assert!(Arc::ptr_eq(file, &svg)); + assert_eq!(delivered.len(), 1, "the browser UI must receive exactly one batch"); + let batch = &delivered[0]; + assert_eq!(batch.files.len(), 1, "the browser UI must receive exactly one file"); + assert!(Arc::ptr_eq(&batch.files[0], &svg)); assert_eq!((batch.pos, batch.shift), (expected_pos, expected_shift)); assert!(position.get().is_none()); }