summaryrefslogtreecommitdiff
path: root/ext/web
diff options
context:
space:
mode:
Diffstat (limited to 'ext/web')
-rw-r--r--ext/web/blob.rs5
-rw-r--r--ext/web/compression.rs1
-rw-r--r--ext/web/lib.rs11
-rw-r--r--ext/web/message_port.rs3
-rw-r--r--ext/web/timers.rs13
5 files changed, 3 insertions, 30 deletions
diff --git a/ext/web/blob.rs b/ext/web/blob.rs
index ad7f6c582..43121ee3a 100644
--- a/ext/web/blob.rs
+++ b/ext/web/blob.rs
@@ -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" {
diff --git a/ext/web/compression.rs b/ext/web/compression.rs
index d38f65d6a..f5ee38257 100644
--- a/ext/web/compression.rs
+++ b/ext/web/compression.rs
@@ -93,7 +93,6 @@ pub fn op_compression_write(
pub fn op_compression_finish(
state: &mut OpState,
rid: ResourceId,
- _: (),
) -> Result<ZeroCopyBuf, AnyError> {
let resource = state.resource_table.take::<CompressionResource>(rid)?;
let resource = Rc::try_unwrap(resource).unwrap();
diff --git a/ext/web/lib.rs b/ext/web/lib.rs
index 6c278cbb0..17133e156 100644
--- a/ext/web/lib.rs
+++ b/ext/web/lib.rs
@@ -123,7 +123,6 @@ pub fn init<P: TimersPermission + 'static>(
fn op_base64_decode(
_: &mut OpState,
input: String,
- _: (),
) -> Result<ZeroCopyBuf, AnyError> {
let mut input = input.into_bytes();
input.retain(|c| !c.is_ascii_whitespace());
@@ -134,7 +133,6 @@ fn op_base64_decode(
fn op_base64_atob(
_: &mut OpState,
s: ByteString,
- _: (),
) -> Result<ByteString, AnyError> {
let mut s = s.0;
s.retain(|c| !c.is_ascii_whitespace());
@@ -188,17 +186,12 @@ fn b64_decode(input: &[u8]) -> Result<Vec<u8>, AnyError> {
fn op_base64_encode(
_: &mut OpState,
s: ZeroCopyBuf,
- _: (),
) -> Result<String, AnyError> {
Ok(b64_encode(&s))
}
#[op]
-fn op_base64_btoa(
- _: &mut OpState,
- s: ByteString,
- _: (),
-) -> Result<String, AnyError> {
+fn op_base64_btoa(_: &mut OpState, s: ByteString) -> Result<String, AnyError> {
Ok(b64_encode(&s))
}
@@ -220,7 +213,6 @@ struct DecoderOptions {
fn op_encoding_normalize_label(
_state: &mut OpState,
label: String,
- _: (),
) -> Result<String, AnyError> {
let encoding = Encoding::for_label_no_replacement(label.as_bytes())
.ok_or_else(|| {
@@ -236,7 +228,6 @@ fn op_encoding_normalize_label(
fn op_encoding_new_decoder(
state: &mut OpState,
options: DecoderOptions,
- _: (),
) -> Result<ResourceId, AnyError> {
let DecoderOptions {
label,
diff --git a/ext/web/message_port.rs b/ext/web/message_port.rs
index 7f2b18b3c..b193e6b9b 100644
--- a/ext/web/message_port.rs
+++ b/ext/web/message_port.rs
@@ -109,8 +109,6 @@ impl Resource for MessagePortResource {
#[op]
pub fn op_message_port_create_entangled(
state: &mut OpState,
- _: (),
- _: (),
) -> Result<(ResourceId, ResourceId), AnyError> {
let (port1, port2) = create_entangled_message_port();
@@ -211,7 +209,6 @@ pub fn op_message_port_post_message(
pub async fn op_message_port_recv_message(
state: Rc<RefCell<OpState>>,
rid: ResourceId,
- _: (),
) -> Result<Option<JsMessageData>, AnyError> {
let resource = {
let state = state.borrow();
diff --git a/ext/web/timers.rs b/ext/web/timers.rs
index 9a78240f7..670df3582 100644
--- a/ext/web/timers.rs
+++ b/ext/web/timers.rs
@@ -28,11 +28,7 @@ pub type StartTime = Instant;
// If the High precision flag is not set, the
// nanoseconds are rounded on 2ms.
#[op]
-pub fn op_now<TP>(
- state: &mut OpState,
- _argument: (),
- _: (),
-) -> Result<f64, AnyError>
+pub fn op_now<TP>(state: &mut OpState, _argument: ()) -> Result<f64, AnyError>
where
TP: TimersPermission + 'static,
{
@@ -68,11 +64,7 @@ impl Resource for TimerHandle {
/// Creates a [`TimerHandle`] resource that can be used to cancel invocations of
/// [`op_sleep`].
#[op]
-pub fn op_timer_handle(
- state: &mut OpState,
- _: (),
- _: (),
-) -> Result<ResourceId, AnyError> {
+pub fn op_timer_handle(state: &mut OpState) -> Result<ResourceId, AnyError> {
let rid = state
.resource_table
.add(TimerHandle(CancelHandle::new_rc()));
@@ -98,7 +90,6 @@ pub async fn op_sleep(
pub fn op_sleep_sync<TP>(
state: &mut OpState,
millis: u64,
- _: (),
) -> Result<(), AnyError>
where
TP: TimersPermission + 'static,