|
@ -81,10 +81,7 @@ impl Clients { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
let client_states = unsafe {
|
|
|
let client_states = unsafe {
|
|
|
// TODO: this should just be a normal transmute but due to compiler limitations it
|
|
|
|
|
|
// does not yet work with const generics
|
|
|
|
|
|
// https://github.com/rust-lang/rust/issues/61956
|
|
|
|
|
|
std::mem::transmute_copy::<_, [RwLockReadGuard<ClientState>; N]>(&client_states)
|
|
|
|
|
|
|
|
|
std::mem::transmute_copy(&client_states)
|
|
|
};
|
|
|
};
|
|
|
|
|
|
|
|
|
Ok(func(client_states).await)
|
|
|
Ok(func(client_states).await)
|
|
|