From 2c049bd1a5a985bbf78a444827eec8fe2bc8be96 Mon Sep 17 00:00:00 2001 From: shenjack-5600u <3695888@qq.com> Date: Thu, 8 Feb 2024 00:47:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=97=AF=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cluster.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cluster.rs b/src/cluster.rs index 8f73e40..438ff14 100644 --- a/src/cluster.rs +++ b/src/cluster.rs @@ -29,7 +29,6 @@ pub struct Cluster { impl Cluster { pub async fn new(config: Config) -> Self { - let disconnect = |reason: Payload, _: Client| { async move { fatal!("socket disconnect: {:?}", reason); @@ -54,7 +53,10 @@ impl Cluster { } pub async fn disconnect(&self) { - self.socket.disconnect().await.expect("Failed to disconnect"); + self.socket + .disconnect() + .await + .expect("Failed to disconnect"); } /// ```typescript