From 82520041eb6399080ec99b9b3096224a1e999823 Mon Sep 17 00:00:00 2001 From: skoupidi Date: Tue, 17 Sep 2024 16:56:38 +0300 Subject: [PATCH] chore: clippy elided lifetimes --- bin/darkfid/src/rpc.rs | 2 +- bin/darkirc/src/rpc.rs | 2 +- bin/genev/genevd/src/rpc.rs | 2 +- bin/lilith/src/main.rs | 2 +- bin/minerd/src/rpc.rs | 2 +- bin/tau/taud/src/jsonrpc.rs | 2 +- example/dchat/dchatd/src/rpc.rs | 2 +- src/rpc/server.rs | 4 ++-- tests/jsonrpc.rs | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/darkfid/src/rpc.rs b/bin/darkfid/src/rpc.rs index bf4d610f6..485d632d6 100644 --- a/bin/darkfid/src/rpc.rs +++ b/bin/darkfid/src/rpc.rs @@ -89,7 +89,7 @@ impl RequestHandler for Darkfid { } } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/bin/darkirc/src/rpc.rs b/bin/darkirc/src/rpc.rs index 15f1ed032..9b4d1689e 100644 --- a/bin/darkirc/src/rpc.rs +++ b/bin/darkirc/src/rpc.rs @@ -55,7 +55,7 @@ impl RequestHandler for DarkIrc { } } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/bin/genev/genevd/src/rpc.rs b/bin/genev/genevd/src/rpc.rs index 32186b30e..92e6f0b0f 100644 --- a/bin/genev/genevd/src/rpc.rs +++ b/bin/genev/genevd/src/rpc.rs @@ -68,7 +68,7 @@ impl RequestHandler for JsonRpcInterface { } } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/bin/lilith/src/main.rs b/bin/lilith/src/main.rs index c4b1c48bb..943518b43 100644 --- a/bin/lilith/src/main.rs +++ b/bin/lilith/src/main.rs @@ -250,7 +250,7 @@ impl RequestHandler for Lilith { } } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/bin/minerd/src/rpc.rs b/bin/minerd/src/rpc.rs index 09cbb53fd..6c2a4538d 100644 --- a/bin/minerd/src/rpc.rs +++ b/bin/minerd/src/rpc.rs @@ -54,7 +54,7 @@ impl RequestHandler for Minerd { } } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/bin/tau/taud/src/jsonrpc.rs b/bin/tau/taud/src/jsonrpc.rs index ed43dac9f..ba8477f2f 100644 --- a/bin/tau/taud/src/jsonrpc.rs +++ b/bin/tau/taud/src/jsonrpc.rs @@ -99,7 +99,7 @@ impl RequestHandler for JsonRpcInterface { to_json_result(rep, req.id) } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/example/dchat/dchatd/src/rpc.rs b/example/dchat/dchatd/src/rpc.rs index bcc59a4ff..531cd4fe7 100644 --- a/example/dchat/dchatd/src/rpc.rs +++ b/example/dchat/dchatd/src/rpc.rs @@ -49,7 +49,7 @@ impl RequestHandler for Dchat { // ANCHOR_END: req_match } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/src/rpc/server.rs b/src/rpc/server.rs index 12ea19e38..045220d7f 100644 --- a/src/rpc/server.rs +++ b/src/rpc/server.rs @@ -46,7 +46,7 @@ pub trait RequestHandler: Sync + Send { JsonResponse::new(JsonValue::String("pong".to_string()), id).into() } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet>; + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet>; async fn connections(&self) -> Vec { self.connections_mut().await.iter().cloned().collect() @@ -405,7 +405,7 @@ mod tests { } } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } } diff --git a/tests/jsonrpc.rs b/tests/jsonrpc.rs index 66b6e0a50..b11f2bd46 100644 --- a/tests/jsonrpc.rs +++ b/tests/jsonrpc.rs @@ -66,7 +66,7 @@ impl RequestHandler for RpcSrv { } } - async fn connections_mut(&self) -> MutexGuard<'_, HashSet> { + async fn connections_mut(&self) -> MutexGuard<'life0, HashSet> { self.rpc_connections.lock().await } }