From ad6b00a2bf061a90c72737d0ecc4a58bb0a89550 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 11 Mar 2024 23:48:00 -0400 Subject: chore: enable clippy unused_async rule (#22834) --- ext/net/02_tls.js | 3 ++- ext/net/io.rs | 1 + ext/net/ops_tls.rs | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/net') diff --git a/ext/net/02_tls.js b/ext/net/02_tls.js index 7fde7d12b..04b0a5850 100644 --- a/ext/net/02_tls.js +++ b/ext/net/02_tls.js @@ -166,6 +166,7 @@ function listenTls({ return new TlsListener(rid, localAddr); } +// deno-lint-ignore require-await async function startTls( conn, { @@ -174,7 +175,7 @@ async function startTls( alpnProtocols = undefined, } = {}, ) { - const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_tls_start({ + const { 0: rid, 1: localAddr, 2: remoteAddr } = op_tls_start({ rid: conn[internalRidSymbol], hostname, caCerts, diff --git a/ext/net/io.rs b/ext/net/io.rs index 9254fce08..f3aed3fcb 100644 --- a/ext/net/io.rs +++ b/ext/net/io.rs @@ -152,6 +152,7 @@ impl UnixStreamResource { fn write(self: Rc, _data: &[u8]) -> AsyncResult { unreachable!() } + #[allow(clippy::unused_async)] pub async fn shutdown(self: Rc) -> Result<(), AnyError> { unreachable!() } diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs index b16dafa71..e83173e90 100644 --- a/ext/net/ops_tls.rs +++ b/ext/net/ops_tls.rs @@ -159,9 +159,9 @@ pub struct StartTlsArgs { alpn_protocols: Option>, } -#[op2(async)] +#[op2] #[serde] -pub async fn op_tls_start( +pub fn op_tls_start( state: Rc>, #[serde] args: StartTlsArgs, ) -> Result<(ResourceId, IpAddr, IpAddr), AnyError> -- cgit v1.2.3