diff options
| author | mat <git@matdoes.dev> | 2025-05-02 02:41:14 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-05-02 02:41:14 +0000 |
| commit | 1d3f659c1d304b2a9820feaac063cac3109c2add (patch) | |
| tree | f0a4798449c39f76469c988df04f9bcde2489a83 /azalea/src/lib.rs | |
| parent | 881055e58711838893416bfc555e0643c5cfa515 (diff) | |
| download | azalea-drasl-1d3f659c1d304b2a9820feaac063cac3109c2add.tar.xz | |
make ClientBuilder/SwarmBuilder Send
Diffstat (limited to 'azalea/src/lib.rs')
| -rw-r--r-- | azalea/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index 0a8300b1..d63ea6c3 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -43,7 +43,8 @@ use protocol::{ServerAddress, resolver::ResolverError}; use swarm::SwarmBuilder; use thiserror::Error; -pub type BoxHandleFn<S, R> = Box<dyn Fn(Client, azalea_client::Event, S) -> BoxFuture<'static, R>>; +pub type BoxHandleFn<S, R> = + Box<dyn Fn(Client, azalea_client::Event, S) -> BoxFuture<'static, R> + Send>; pub type HandleFn<S, Fut> = fn(Client, azalea_client::Event, S) -> Fut; #[derive(Error, Debug)] @@ -76,6 +77,7 @@ pub struct ClientBuilder<S, R> where S: Default + Send + Sync + Clone + Component + 'static, R: Send + 'static, + Self: Send, { /// Internally, ClientBuilder is just a wrapper over SwarmBuilder since it's /// technically just a subset of it so we can avoid duplicating code this |
