diff --git a/src/ratelimiter.rs b/src/ratelimiter.rs index 2b08082..5ffcca6 100644 --- a/src/ratelimiter.rs +++ b/src/ratelimiter.rs @@ -6,7 +6,6 @@ use std::collections::HashMap; -use log::{self, debug}; use reqwest::{Client, RequestBuilder, Response}; use serde::Deserialize; use serde_json::from_str; diff --git a/src/voice/gateway/events.rs b/src/voice/gateway/events.rs index 90de2ce..22db83b 100644 --- a/src/voice/gateway/events.rs +++ b/src/voice/gateway/events.rs @@ -2,9 +2,10 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. +use pubserve::Publisher; + use crate::{ errors::VoiceGatewayError, - gateway::GatewayEvent, types::{ SessionDescription, SessionUpdate, Speaking, SsrcDefinition, VoiceBackendVersion, VoiceClientConnectFlags, VoiceClientConnectPlatform, VoiceClientDisconnection, diff --git a/src/voice/gateway/gateway.rs b/src/voice/gateway/gateway.rs index f1bde91..ba4df80 100644 --- a/src/voice/gateway/gateway.rs +++ b/src/voice/gateway/gateway.rs @@ -6,6 +6,7 @@ use std::{sync::Arc, time::Duration}; use log::*; +use pubserve::Publisher; use tokio::sync::Mutex; use futures_util::SinkExt; @@ -16,7 +17,6 @@ use crate::gateway::Stream; use crate::gateway::WebSocketBackend; use crate::{ errors::VoiceGatewayError, - gateway::GatewayEvent, types::{ VoiceGatewayReceivePayload, VoiceHelloData, WebSocketEvent, VOICE_BACKEND_VERSION, VOICE_CLIENT_CONNECT_FLAGS, VOICE_CLIENT_CONNECT_PLATFORM, VOICE_CLIENT_DISCONNECT, diff --git a/src/voice/udp/events.rs b/src/voice/udp/events.rs index dfa26e7..8958b71 100644 --- a/src/voice/udp/events.rs +++ b/src/voice/udp/events.rs @@ -3,8 +3,9 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use discortp::{rtcp::Rtcp, rtp::Rtp}; +use pubserve::Publisher; -use crate::{gateway::GatewayEvent, types::WebSocketEvent}; +use crate::types::WebSocketEvent; impl WebSocketEvent for Rtp {} impl WebSocketEvent for Rtcp {} @@ -18,8 +19,8 @@ pub struct VoiceUDPEvents { impl Default for VoiceUDPEvents { fn default() -> Self { Self { - rtp: GatewayEvent::new(), - rtcp: GatewayEvent::new(), + rtp: Publisher::new(), + rtcp: Publisher::new(), } } }