feat(ops): custom arity (#13949)

Also cleanup & drop ignored wildcard op-args
This commit is contained in:
Aaron O'Mullan 2022-03-14 23:38:53 +01:00 committed by GitHub
parent 9f494dc405
commit 88d0f01948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 99 additions and 498 deletions

View file

@ -163,7 +163,6 @@ impl BlobPart for SlicedBlobPart {
pub fn op_blob_create_part(
state: &mut deno_core::OpState,
data: ZeroCopyBuf,
_: (),
) -> Result<Uuid, AnyError> {
let blob_store = state.borrow::<BlobStore>();
let part = InMemoryBlobPart(data.to_vec());
@ -208,7 +207,6 @@ pub fn op_blob_slice_part(
pub async fn op_blob_read_part(
state: Rc<RefCell<deno_core::OpState>>,
id: Uuid,
_: (),
) -> Result<ZeroCopyBuf, AnyError> {
let part = {
let state = state.borrow();
@ -224,7 +222,6 @@ pub async fn op_blob_read_part(
pub fn op_blob_remove_part(
state: &mut deno_core::OpState,
id: Uuid,
_: (),
) -> Result<(), AnyError> {
let blob_store = state.borrow::<BlobStore>();
blob_store.remove_part(&id);
@ -261,7 +258,6 @@ pub fn op_blob_create_object_url(
pub fn op_blob_revoke_object_url(
state: &mut deno_core::OpState,
url: String,
_: (),
) -> Result<(), AnyError> {
let url = Url::parse(&url)?;
let blob_store = state.borrow::<BlobStore>();
@ -285,7 +281,6 @@ pub struct ReturnBlobPart {
pub fn op_blob_from_object_url(
state: &mut deno_core::OpState,
url: String,
_: (),
) -> Result<Option<ReturnBlob>, AnyError> {
let url = Url::parse(&url)?;
if url.scheme() != "blob" {