From e5c1b2efb597bc7089e833bf570d8217c36f50c3 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Tue, 15 Oct 2024 17:22:31 -0500 Subject: refactor: removed unused deps --- src/service.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/service.rs') diff --git a/src/service.rs b/src/service.rs index 74ecb1d..1df48be 100644 --- a/src/service.rs +++ b/src/service.rs @@ -1,20 +1,17 @@ use serde::Deserialize; -use crate::Status; +use crate::{status::Sender, Status}; pub mod command; pub mod http; pub mod tcp; pub trait IntoService { - fn into_service( - self, - tx: tokio::sync::watch::Sender, - ) -> impl std::future::Future; + fn into_service(self, tx: Sender) -> impl std::future::Future; } impl IntoService for () { - async fn into_service(self, tx: tokio::sync::watch::Sender) { + async fn into_service(self, tx: Sender) { let mut interval = tokio::time::interval(std::time::Duration::from_secs(3)); let mut status = Status::Ok; @@ -50,7 +47,7 @@ pub enum ServiceKind { } impl IntoService for ServiceKind { - async fn into_service(self, tx: tokio::sync::watch::Sender) { + async fn into_service(self, tx: Sender) { match self { ServiceKind::Test(()) => ().into_service(tx).await, ServiceKind::Http(h) => h.into_service(tx).await, -- cgit v1.2.3-70-g09d2