cargo fmt + clippy fixes, remove unused voice_membership.rs

This commit is contained in:
loki5512344 2026-07-09 13:07:38 +02:00
parent 9821814240
commit c34ed2a192
Signed by: boba
GPG key ID: 253067914055423B
13 changed files with 108 additions and 245 deletions

View file

@ -1,12 +1,8 @@
mod voice_membership;
use anyhow::Result;
use std::sync::Arc;
use tokio::sync::broadcast;
use tracing::info;
#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt()
@ -22,10 +18,7 @@ async fn main() -> Result<()> {
let cfg: vnox_gateway::domain::config::Config =
toml::from_str(&text).map_err(|e| anyhow::anyhow!("invalid config: {e}"))?;
info!(
"VNOX Server starting — node: {}",
cfg.node.name
);
info!("VNOX Server starting — node: {}", cfg.node.name);
info!("Gateway TCP: {}", cfg.gateway.bind);
info!("Voice UDP: {}", cfg.voice.bind);
@ -59,9 +52,8 @@ async fn main() -> Result<()> {
vnox_voice_node::runner::run_bind(&node_name, &voice_bind).await
});
let gate_handle = tokio::spawn(async move {
vnox_gateway::run(gate_cfg, Some(voice_member_tx)).await
});
let gate_handle =
tokio::spawn(async move { vnox_gateway::run(gate_cfg, Some(voice_member_tx)).await });
tokio::select! {
r = voice_handle => {

View file

@ -1,22 +0,0 @@
use tokio::sync::broadcast;
#[derive(Clone, Debug)]
pub enum VoiceMembershipEvent {
Joined {
channel_id: String,
session_id: String,
user_id: String,
},
Left {
channel_id: String,
session_id: String,
user_id: String,
},
}
pub fn voice_membership_channel() -> (
broadcast::Sender<VoiceMembershipEvent>,
broadcast::Receiver<VoiceMembershipEvent>,
) {
broadcast::channel(256)
}