From 88d0f01948b68f4a4d87e02a5138e94ac0a6eaea Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Mon, 14 Mar 2022 23:38:53 +0100 Subject: feat(ops): custom arity (#13949) Also cleanup & drop ignored wildcard op-args --- ext/net/ops.rs | 6 +----- ext/net/ops_tls.rs | 5 ----- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'ext/net') diff --git a/ext/net/ops.rs b/ext/net/ops.rs index 2c9129ebf..1cd3ad8e6 100644 --- a/ext/net/ops.rs +++ b/ext/net/ops.rs @@ -162,7 +162,6 @@ async fn accept_tcp( async fn op_net_accept( state: Rc>, args: AcceptArgs, - _: (), ) -> Result { match args.transport.as_str() { "tcp" => accept_tcp(state, args, ()).await, @@ -306,7 +305,6 @@ pub struct ConnectArgs { pub async fn op_net_connect( state: Rc>, args: ConnectArgs, - _: (), ) -> Result where NP: NetPermissions + 'static, @@ -482,7 +480,6 @@ fn listen_udp( fn op_net_listen( state: &mut OpState, args: ListenArgs, - _: (), ) -> Result where NP: NetPermissions + 'static, @@ -622,7 +619,6 @@ pub struct NameServer { pub async fn op_dns_resolve( state: Rc>, args: ResolveAddrArgs, - _: (), ) -> Result, AnyError> where NP: NetPermissions + 'static, @@ -942,7 +938,7 @@ mod tests { }; let connect_fut = - op_net_connect::call::(conn_state, connect_args, ()); + op_net_connect::call::(conn_state, connect_args); let conn = connect_fut.await.unwrap(); let rid = conn.rid; diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs index 6289d963f..fea59cc22 100644 --- a/ext/net/ops_tls.rs +++ b/ext/net/ops_tls.rs @@ -769,7 +769,6 @@ pub struct StartTlsArgs { pub async fn op_tls_start( state: Rc>, args: StartTlsArgs, - _: (), ) -> Result where NP: NetPermissions + 'static, @@ -862,7 +861,6 @@ where pub async fn op_tls_connect( state: Rc>, args: ConnectTlsArgs, - _: (), ) -> Result where NP: NetPermissions + 'static, @@ -1022,7 +1020,6 @@ pub struct ListenTlsArgs { pub fn op_tls_listen( state: &mut OpState, args: ListenTlsArgs, - _: (), ) -> Result where NP: NetPermissions + 'static, @@ -1119,7 +1116,6 @@ where pub async fn op_tls_accept( state: Rc>, rid: ResourceId, - _: (), ) -> Result { let resource = state .borrow() @@ -1171,7 +1167,6 @@ pub async fn op_tls_accept( pub async fn op_tls_handshake( state: Rc>, rid: ResourceId, - _: (), ) -> Result { let resource = state .borrow() -- cgit v1.2.3