summaryrefslogtreecommitdiff
path: root/ext/web/blob.rs
diff options
context:
space:
mode:
authorAndreu Botella <andreu@andreubotella.com>2022-05-13 10:36:31 +0200
committerGitHub <noreply@github.com>2022-05-13 10:36:31 +0200
commit3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad (patch)
tree7fcc92da290889d3d2290f6e4902ac60685aae87 /ext/web/blob.rs
parent0ee76da07b12fba38962634e65853d73adf9d4c0 (diff)
chore(runtime): Make some ops in ext and runtime infallible. (#14589)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
Diffstat (limited to 'ext/web/blob.rs')
-rw-r--r--ext/web/blob.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/ext/web/blob.rs b/ext/web/blob.rs
index 43121ee3a..7da42e178 100644
--- a/ext/web/blob.rs
+++ b/ext/web/blob.rs
@@ -163,11 +163,10 @@ impl BlobPart for SlicedBlobPart {
pub fn op_blob_create_part(
state: &mut deno_core::OpState,
data: ZeroCopyBuf,
-) -> Result<Uuid, AnyError> {
+) -> Uuid {
let blob_store = state.borrow::<BlobStore>();
let part = InMemoryBlobPart(data.to_vec());
- let id = blob_store.insert_part(Arc::new(part));
- Ok(id)
+ blob_store.insert_part(Arc::new(part))
}
#[derive(Deserialize)]
@@ -219,13 +218,9 @@ pub async fn op_blob_read_part(
}
#[op]
-pub fn op_blob_remove_part(
- state: &mut deno_core::OpState,
- id: Uuid,
-) -> Result<(), AnyError> {
+pub fn op_blob_remove_part(state: &mut deno_core::OpState, id: Uuid) {
let blob_store = state.borrow::<BlobStore>();
blob_store.remove_part(&id);
- Ok(())
}
#[op]