diff --git a/src/voice/udp.rs b/src/voice/udp.rs index 36703df..03e784f 100644 --- a/src/voice/udp.rs +++ b/src/voice/udp.rs @@ -2,7 +2,7 @@ use std::{net::SocketAddr, sync::Arc}; -use log::{debug, info, warn, trace}; +use log::{debug, info, trace, warn}; use tokio::{net::UdpSocket, sync::Mutex}; use crypto_secretbox::{ @@ -143,7 +143,6 @@ impl UdpHandler { /// Handles a message buf async fn handle_message(&self, buf: &[u8]) { - let parsed = demux(buf); match parsed { @@ -151,7 +150,8 @@ impl UdpHandler { let ciphertext = buf[12..buf.len()].to_vec(); trace!( "VUDP: Parsed packet as rtp! {:?}; data: {:?}", - rtp, ciphertext + rtp, + ciphertext ); let data_lock = self.data.lock().await; @@ -171,7 +171,6 @@ impl UdpHandler { match session_description.encryption_mode { crate::types::VoiceEncryptionMode::Xsalsa20Poly1305 => { - // The header is only 12 bytes, but the nonce has to be 24 // This actually works mind you, and anything else doesn't for _i in 0..12 { diff --git a/src/voice/voice_data.rs b/src/voice/voice_data.rs index a4740b1..b2bc175 100644 --- a/src/voice/voice_data.rs +++ b/src/voice/voice_data.rs @@ -1,6 +1,6 @@ use discortp::discord::IpDiscovery; -use crate::types::{Snowflake, VoiceReady, VoiceServerUpdate, SessionDescription}; +use crate::types::{SessionDescription, Snowflake, VoiceReady, VoiceServerUpdate}; #[derive(Debug, Default)] /// Saves data shared between parts of the voice architecture