aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/lib.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-02 02:41:14 +0000
committermat <git@matdoes.dev>2025-05-02 02:41:14 +0000
commit1d3f659c1d304b2a9820feaac063cac3109c2add (patch)
treef0a4798449c39f76469c988df04f9bcde2489a83 /azalea/src/lib.rs
parent881055e58711838893416bfc555e0643c5cfa515 (diff)
downloadazalea-drasl-1d3f659c1d304b2a9820feaac063cac3109c2add.tar.xz
make ClientBuilder/SwarmBuilder Send
Diffstat (limited to 'azalea/src/lib.rs')
-rw-r--r--azalea/src/lib.rs4
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