aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/lib.rs
diff options
context:
space:
mode:
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