diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-10-15 17:22:31 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-10-15 17:22:31 -0500 |
commit | e5c1b2efb597bc7089e833bf570d8217c36f50c3 (patch) | |
tree | 5e9dd59db44d824e9df605154575eb3d1b4c79d1 /src/service/command.rs | |
parent | fd13b0b215a0763fa065038e7add3922059a332c (diff) |
refactor: removed unused depsv0.1.0
Diffstat (limited to 'src/service/command.rs')
-rw-r--r-- | src/service/command.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/service/command.rs b/src/service/command.rs index 6b44e1d..7f3bd59 100644 --- a/src/service/command.rs +++ b/src/service/command.rs @@ -1,12 +1,9 @@ use std::{process::Stdio, time::Duration}; use serde::{Deserialize, Serialize}; -use tokio::{ - io::{AsyncBufReadExt, BufReader}, - sync::watch::Sender, -}; +use tokio::io::{AsyncBufReadExt, BufReader}; -use crate::Status; +use crate::status::Sender; use super::IntoService; @@ -43,7 +40,7 @@ pub struct Command { } impl Command { - async fn persist(&self, tx: Sender<Status>) -> Result<(), Error> { + async fn persist(&self, tx: Sender) -> Result<(), Error> { let mut command = tokio::process::Command::new(&self.command); command.args(&self.args); @@ -83,7 +80,7 @@ impl Command { } impl IntoService for Command { - async fn into_service(self, tx: tokio::sync::watch::Sender<Status>) { + async fn into_service(self, tx: Sender) { let mut interval = tokio::time::interval(self.interval); loop { interval.tick().await; |