fix(file-api): adapt snapshot tests to typed entries

This commit is contained in:
ldm0
2026-11-20 22:47:49 +08:00
parent f763db1896
commit ce0947a0ec
+4 -4
View File
@@ -750,11 +750,11 @@ mod tests {
let ObjectUrlData::Blob {
bytes: captured_bytes,
mime_type,
} = &captured.data;
} = captured.data;
let ObjectUrlData::Blob {
bytes: other_bytes, ..
} = &other.data;
assert!(Arc::ptr_eq(captured_bytes, other_bytes));
} = other.data;
assert!(Arc::ptr_eq(&captured_bytes, &other_bytes));
assert_eq!(captured.access_key.as_ref(), Some(&first_key));
assert_eq!(other.access_key.as_ref(), Some(&second_key));
assert_eq!(
@@ -766,7 +766,7 @@ mod tests {
assert!(store.revoke_object_url_with_access_key(&second, &second_key));
assert!(store.object_url_entry(&first).is_none());
assert!(store.blob_bytes(blob).is_none());
assert_eq!(&**captured_bytes, b"private");
assert_eq!(&*captured_bytes, b"private");
assert_eq!(mime_type, "text/plain");
assert_eq!(captured.access_key.as_ref(), Some(&first_key));
}