chore: formatting

This commit is contained in:
kozabrada123 2023-12-16 15:31:48 +01:00
parent b9cf17ef3b
commit d135e0a192
2 changed files with 4 additions and 5 deletions

View File

@ -2,7 +2,7 @@
use std::{net::SocketAddr, sync::Arc}; 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 tokio::{net::UdpSocket, sync::Mutex};
use crypto_secretbox::{ use crypto_secretbox::{
@ -143,7 +143,6 @@ impl UdpHandler {
/// Handles a message buf /// Handles a message buf
async fn handle_message(&self, buf: &[u8]) { async fn handle_message(&self, buf: &[u8]) {
let parsed = demux(buf); let parsed = demux(buf);
match parsed { match parsed {
@ -151,7 +150,8 @@ impl UdpHandler {
let ciphertext = buf[12..buf.len()].to_vec(); let ciphertext = buf[12..buf.len()].to_vec();
trace!( trace!(
"VUDP: Parsed packet as rtp! {:?}; data: {:?}", "VUDP: Parsed packet as rtp! {:?}; data: {:?}",
rtp, ciphertext rtp,
ciphertext
); );
let data_lock = self.data.lock().await; let data_lock = self.data.lock().await;
@ -171,7 +171,6 @@ impl UdpHandler {
match session_description.encryption_mode { match session_description.encryption_mode {
crate::types::VoiceEncryptionMode::Xsalsa20Poly1305 => { crate::types::VoiceEncryptionMode::Xsalsa20Poly1305 => {
// The header is only 12 bytes, but the nonce has to be 24 // The header is only 12 bytes, but the nonce has to be 24
// This actually works mind you, and anything else doesn't // This actually works mind you, and anything else doesn't
for _i in 0..12 { for _i in 0..12 {

View File

@ -1,6 +1,6 @@
use discortp::discord::IpDiscovery; use discortp::discord::IpDiscovery;
use crate::types::{Snowflake, VoiceReady, VoiceServerUpdate, SessionDescription}; use crate::types::{SessionDescription, Snowflake, VoiceReady, VoiceServerUpdate};
#[derive(Debug, Default)] #[derive(Debug, Default)]
/// Saves data shared between parts of the voice architecture /// Saves data shared between parts of the voice architecture