1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 09:10:40 -05:00
denoland-deno/ops/optimizer_tests/op_blob_revoke_object_url.rs

11 lines
314 B
Rust
Raw Normal View History

pub fn op_blob_revoke_object_url(
state: &mut OpState,
url: String,
) -> Result<(), AnyError> {
// TODO(@littledivy): fast compatible https://github.com/denoland/deno/issues/17159
let url = Url::parse(&url)?;
let blob_store = state.borrow::<BlobStore>();
blob_store.remove_object_url(&url);
Ok(())
}