diff options
| author | acdenisSK <[email protected]> | 2017-07-15 01:49:59 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-15 01:49:59 +0200 |
| commit | 4ce2ddfb8dd04eefd769a1d17b590854f66af17c (patch) | |
| tree | e0f997ad8c025f3e304e8434e667a909d904dfc1 /src/client/dispatch.rs | |
| parent | Add a way to close all shards explictly (diff) | |
| download | serenity-4ce2ddfb8dd04eefd769a1d17b590854f66af17c.tar.xz serenity-4ce2ddfb8dd04eefd769a1d17b590854f66af17c.zip | |
Remove more threads with futures
Diffstat (limited to 'src/client/dispatch.rs')
| -rw-r--r-- | src/client/dispatch.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/dispatch.rs b/src/client/dispatch.rs index f2850ec..68190d1 100644 --- a/src/client/dispatch.rs +++ b/src/client/dispatch.rs @@ -93,7 +93,7 @@ macro_rules! impl_reaction_events { } #[cfg(feature="framework")] -pub fn dispatch<H: EventHandler + Send + Sync + 'static>(event: Event, +pub fn dispatch<H: EventHandler + 'static>(event: Event, conn: &Arc<Mutex<Shard>>, framework: &Arc<sync::Mutex<Framework>>, data: &Arc<Mutex<ShareMap>>, @@ -126,7 +126,7 @@ pub fn dispatch<H: EventHandler + Send + Sync + 'static>(event: Event, } #[cfg(not(feature="framework"))] -pub fn dispatch<H: EventHandler + Send + Sync + 'static>(event: Event, +pub fn dispatch<H: EventHandler + 'static>(event: Event, conn: &Arc<Mutex<Shard>>, data: &Arc<Mutex<ShareMap>>, event_handler: &Arc<H>, @@ -152,7 +152,7 @@ pub fn dispatch<H: EventHandler + Send + Sync + 'static>(event: Event, } #[allow(unused_mut)] -fn dispatch_message<H: EventHandler + Send + Sync + 'static>(context: Context, +fn dispatch_message<H: EventHandler + 'static>(context: Context, mut message: Message, event_handler: &Arc<H>, tokio_handle: &Handle) { @@ -169,7 +169,7 @@ fn dispatch_message<H: EventHandler + Send + Sync + 'static>(context: Context, }); } -fn dispatch_reaction_add<H: EventHandler + Send + Sync + 'static>(context: Context, +fn dispatch_reaction_add<H: EventHandler + 'static>(context: Context, reaction: Reaction, event_handler: &Arc<H>, tokio_handle: &Handle) { @@ -180,7 +180,7 @@ fn dispatch_reaction_add<H: EventHandler + Send + Sync + 'static>(context: Conte }); } -fn dispatch_reaction_remove<H: EventHandler + Send + Sync + 'static>(context: Context, +fn dispatch_reaction_remove<H: EventHandler + 'static>(context: Context, reaction: Reaction, event_handler: &Arc<H>, tokio_handle: &Handle) { @@ -192,7 +192,7 @@ fn dispatch_reaction_remove<H: EventHandler + Send + Sync + 'static>(context: Co } #[allow(cyclomatic_complexity, unused_assignments, unused_mut)] -fn handle_event<H: EventHandler + Send + Sync + 'static>(event: Event, +fn handle_event<H: EventHandler + 'static>(event: Event, conn: &Arc<Mutex<Shard>>, data: &Arc<Mutex<ShareMap>>, event_handler: &Arc<H>, |