From d72b0fe5862a99d9ce1a0ef37938f4517de36ed7 Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Sat, 31 Oct 2020 02:37:24 +0100 Subject: cargo fmt --- mumd/src/network/udp.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'mumd/src/network/udp.rs') diff --git a/mumd/src/network/udp.rs b/mumd/src/network/udp.rs index febf7f1..f97807d 100644 --- a/mumd/src/network/udp.rs +++ b/mumd/src/network/udp.rs @@ -6,17 +6,17 @@ use bytes::Bytes; use futures::{join, pin_mut, select, FutureExt, SinkExt, StreamExt}; use futures_util::stream::{SplitSink, SplitStream}; use mumble_protocol::crypt::ClientCryptState; +use mumble_protocol::ping::{PingPacket, PongPacket}; use mumble_protocol::voice::{VoicePacket, VoicePacketPayload}; use mumble_protocol::Serverbound; +use std::collections::HashMap; +use std::convert::TryFrom; use std::net::{Ipv6Addr, SocketAddr}; +use std::rc::Rc; use std::sync::{Arc, Mutex}; use tokio::net::UdpSocket; use tokio::sync::{mpsc, oneshot, watch}; use tokio_util::udp::UdpFramed; -use std::collections::HashMap; -use mumble_protocol::ping::{PingPacket, PongPacket}; -use std::rc::Rc; -use std::convert::TryFrom; type UdpSender = SplitSink, (VoicePacket, SocketAddr)>; type UdpReceiver = SplitStream>; @@ -231,7 +231,11 @@ async fn send_voice( } pub async fn handle_pings( - mut ping_request_receiver: mpsc::UnboundedReceiver<(u64, SocketAddr, Box)>, + mut ping_request_receiver: mpsc::UnboundedReceiver<( + u64, + SocketAddr, + Box, + )>, ) { let udp_socket = UdpSocket::bind((Ipv6Addr::from(0u128), 0u16)) .await @@ -269,4 +273,4 @@ pub async fn handle_pings( debug!("Waiting for ping requests"); join!(sender_handle, receiver_handle); -} \ No newline at end of file +} -- cgit v1.2.1