fixed clippy errors
Rust lint and build / Rust CI (push) Failing after 49s

This commit is contained in:
2026-06-03 15:41:50 +02:00
parent 39a9247f99
commit 3475f7cc1f
7 changed files with 65 additions and 50 deletions
+9 -9
View File
@@ -81,15 +81,15 @@ async fn handle_voice_socket(
select! {
// Receive audio from other users and send to client
voice_packet = rx.recv() => {
if let Ok((speaker_uuid, audio_data)) = voice_packet {
if speaker_uuid != my_uuid {
let mut msg = BytesMut::with_capacity(16 + audio_data.len());
msg.put(speaker_uuid.as_bytes().as_slice());
msg.put(audio_data);
if let Ok((speaker_uuid, audio_data)) = voice_packet
&& speaker_uuid != my_uuid
{
let mut msg = BytesMut::with_capacity(16 + audio_data.len());
msg.put(speaker_uuid.as_bytes().as_slice());
msg.put(audio_data);
if socket.send(Message::Binary(msg.freeze().into())).await.is_err() {
break;
}
if socket.send(Message::Binary(msg.freeze())).await.is_err() {
break;
}
}
}
@@ -99,7 +99,7 @@ async fn handle_voice_socket(
if let Some(Ok(msg)) = client_msg {
match msg {
Message::Binary(data) => {
let _ = tx.send((my_uuid, Bytes::from(data)));
let _ = tx.send((my_uuid, data));
}
Message::Close(_) => {
tracing::debug!("Voice client {} disconnected", who);