From 1d3f659c1d304b2a9820feaac063cac3109c2add Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 2 May 2025 02:41:14 +0000 Subject: make ClientBuilder/SwarmBuilder Send --- azalea/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'azalea/src/lib.rs') 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 = Box BoxFuture<'static, R>>; +pub type BoxHandleFn = + Box BoxFuture<'static, R> + Send>; pub type HandleFn = fn(Client, azalea_client::Event, S) -> Fut; #[derive(Error, Debug)] @@ -76,6 +77,7 @@ pub struct ClientBuilder 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 -- cgit v1.2.3