diff options
| author | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-03 15:54:05 +0400 |
|---|---|---|
| committer | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-03 15:54:05 +0400 |
| commit | 035c69f6f45f8592c730054a5a2b85d5bd35e208 (patch) | |
| tree | 89245f3aa2bee6855373d93f99730b41af0f8159 | |
| parent | 9593f5e56e90b5b4d41ad1e792489de336dc2c37 (diff) | |
fix tokio not working on windows
| -rw-r--r-- | libs/leash/src/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/leash/src/lib.rs b/libs/leash/src/lib.rs index 13e8258..a73a0b5 100644 --- a/libs/leash/src/lib.rs +++ b/libs/leash/src/lib.rs @@ -1,10 +1,8 @@ use anyhow::Result; use serde::de::DeserializeOwned; -use shared::{ - config::Settings, -}; +use shared::config::Settings; use std::{future::Future, pin::Pin}; -use tokio::{signal::unix::SignalKind, sync::oneshot}; +use tokio::sync::oneshot; pub type AnyhowResultFuture<T> = Pin<Box<dyn Future<Output = Result<T>> + Send>>; pub trait Component: Send + Sync + 'static + Sized { @@ -32,7 +30,7 @@ pub trait Component: Send + Sync + 'static + Sized { tokio::spawn(async move { #[cfg(unix)] - tokio::signal::unix::signal(SignalKind::terminate()) + tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate()) .unwrap() .recv() .await; |
