Skip to content

Commit c368473

Browse files
chore: update kanal version (#869)
Closes #868
1 parent 18d8072 commit c368473

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ hex = '0.4.3'
7878
humantime = '2.1.0'
7979
hyperion-proxy = { path = "crates/hyperion-proxy" }
8080
itertools = "0.14.0"
81-
kanal = '0.1.0-pre8'
81+
kanal = '0.1.0'
8282
libc = '0.2.170'
8383
libdeflater = '1.23.1'
8484
memmap2 = '0.9.5'

crates/hyperion-proxy/src/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl PlayerHandle {
121121

122122
pub fn shutdown(&self) {
123123
let _ = self.writer.try_send(OrderedBytes::SHUTDOWN);
124-
self.writer.close();
124+
self.writer.close().unwrap();
125125
}
126126

127127
pub fn enable_receive_broadcasts(&self) {
@@ -143,7 +143,7 @@ impl PlayerHandle {
143143
bail!("failed to send packet to player, channel is full: {is_full}");
144144
}
145145
Err(e) => {
146-
self.writer.close();
146+
self.writer.close().unwrap();
147147
bail!("failed to send packet to player: {e}");
148148
}
149149
}

crates/hyperion/src/common/runtime.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use flecs_ecs::{core::World, macros::Component};
77
use kanal::{Receiver, Sender};
88

99
/// Type alias for world callback functions
10-
pub type WorldCallback = Box<dyn FnOnce(&World)>;
10+
pub type WorldCallback = Box<dyn FnOnce(&World) + Send>;
1111

1212
/// Wrapper around [`tokio::runtime::Runtime`]
1313
#[derive(Component, Deref, DerefMut, Clone)]
@@ -24,11 +24,13 @@ pub struct Tasks {
2424
}
2525

2626
impl AsyncRuntime {
27-
pub fn schedule<T: 'static>(
27+
pub fn schedule<T>(
2828
&self,
2929
future: impl Future<Output = T> + Send + 'static,
3030
handler: fn(T, &World),
31-
) {
31+
) where
32+
T: Send + 'static,
33+
{
3234
let sender = self.callback_sender.clone();
3335

3436
self.spawn(async move {

crates/hyperion/src/storage/thread_local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use flecs_ecs::core::World;
1010
use crate::NUM_THREADS;
1111

1212
/// Thread-local in flecs environment
13-
#[derive(Debug, Default)]
13+
#[derive(Debug, Default, Copy, Clone)]
1414
pub struct ThreadLocal<T> {
1515
locals: [T; NUM_THREADS],
1616
}

0 commit comments

Comments
 (0)