From 1a070011e3064f610ab0ae8e373dd5ea9cabae37 Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Fri, 5 Dec 2025 09:37:40 -0700 Subject: [PATCH] clippy --- signal-gateway-bin/src/admin_netcat/mod.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/signal-gateway-bin/src/admin_netcat/mod.rs b/signal-gateway-bin/src/admin_netcat/mod.rs index 14597f1..c6168e0 100644 --- a/signal-gateway-bin/src/admin_netcat/mod.rs +++ b/signal-gateway-bin/src/admin_netcat/mod.rs @@ -4,7 +4,7 @@ //! writing the message terminated with CRLF, and reading the response until CRLF. use conf::Conf; -use signal_gateway::{AdminMessageResponse, MessageHandlerResult}; +use signal_gateway::{AdminMessageResponse, MessageHandler, MessageHandlerResult}; use std::time::Duration; use tokio::{ io::{AsyncBufReadExt, AsyncWriteExt, BufReader}, @@ -28,16 +28,7 @@ impl AdminNetcatConfig { /// /// The returned handler opens a TCP connection to the configured address, /// writes the message terminated with CRLF, and reads the response until CRLF. - pub fn into_handler( - self, - ) -> Box< - dyn Fn( - String, - ) - -> std::pin::Pin + Send>> - + Send - + Sync, - > { + pub fn into_handler(self) -> MessageHandler { Box::new(move |message: String| { let config = self.clone(); Box::pin(async move { handle_message(&config, message).await })