diff options
| author | Fuwn <[email protected]> | 2021-05-12 10:24:57 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-12 10:24:57 +0000 |
| commit | 74cb547e727c6fed2e5c2e8a8175415239f72062 (patch) | |
| tree | 394a14a71bcc13c9cead4109484416175ef1787b /src/server | |
| parent | build(nix): update deps (diff) | |
| download | whirl-74cb547e727c6fed2e5c2e8a8175415239f72062.tar.xz whirl-74cb547e727c6fed2e5c2e8a8175415239f72062.zip | |
refactor(global): use async_trait macro globally
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/distributor.rs | 2 | ||||
| -rw-r--r-- | src/server/hub.rs | 2 | ||||
| -rw-r--r-- | src/server/mod.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/server/distributor.rs b/src/server/distributor.rs index 26bc87f..cfcaa63 100644 --- a/src/server/distributor.rs +++ b/src/server/distributor.rs @@ -43,7 +43,7 @@ use crate::{ }; pub struct Distributor; -#[async_trait::async_trait] +#[async_trait] impl Server for Distributor { async fn handle( state: Arc<Mutex<Shared>>, diff --git a/src/server/hub.rs b/src/server/hub.rs index 7d6238f..c6e5be8 100644 --- a/src/server/hub.rs +++ b/src/server/hub.rs @@ -40,7 +40,7 @@ use crate::{ }; pub struct Hub; -#[async_trait::async_trait] +#[async_trait] impl Server for Hub { async fn handle( state: Arc<Mutex<Shared>>, diff --git a/src/server/mod.rs b/src/server/mod.rs index 1f986c5..8aad465 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -32,7 +32,7 @@ impl fmt::Display for ServerType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{:?}", self) } } -#[async_trait::async_trait] +#[async_trait] pub trait Server { async fn listen(address: &str, server_type: ServerType) -> Result<(), Box<dyn Error>> { let listener = TcpListener::bind(address).await?; |