Просмотр исходного кода

chore: clippy elided lifetimes

skoupidi 1 год назад
Родитель
Сommit
82520041eb

+ 1 - 1
bin/darkfid/src/rpc.rs

@@ -89,7 +89,7 @@ impl RequestHandler for Darkfid {
         }
     }
 
-    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/darkirc/src/rpc.rs

@@ -55,7 +55,7 @@ impl RequestHandler for DarkIrc {
         }
     }
 
-    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/genev/genevd/src/rpc.rs

@@ -68,7 +68,7 @@ impl RequestHandler for JsonRpcInterface {
         }
     }
 
-    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/lilith/src/main.rs

@@ -250,7 +250,7 @@ impl RequestHandler for Lilith {
         }
     }
 
-    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/minerd/src/rpc.rs

@@ -54,7 +54,7 @@ impl RequestHandler for Minerd {
         }
     }
 
-    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
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<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
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<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 2 - 2
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<StoppableTaskPtr>>;
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>>;
 
     async fn connections(&self) -> Vec<StoppableTaskPtr> {
         self.connections_mut().await.iter().cloned().collect()
@@ -405,7 +405,7 @@ mod tests {
             }
         }
 
-        async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+        async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
             self.rpc_connections.lock().await
         }
     }

+ 1 - 1
tests/jsonrpc.rs

@@ -66,7 +66,7 @@ impl RequestHandler for RpcSrv {
         }
     }
 
-    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'life0, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }