chore: fix clippy

This commit is contained in:
2021-05-17 23:01:11 +08:00
parent ae5169e3bd
commit b2ee806448
4 changed files with 295 additions and 274 deletions

9
src/types.rs Normal file
View File

@@ -0,0 +1,9 @@
use futures_channel::mpsc::UnboundedSender;
use tungstenite::Message;
use std::net::SocketAddr;
use std::collections::{HashMap, BTreeMap};
use std::sync::{Mutex, Arc};
pub type Tx = UnboundedSender<Message>;
pub type PeerMap = Arc<Mutex<HashMap<SocketAddr, Tx>>>;
pub type RoomMap = Arc<Mutex<BTreeMap<String, BTreeMap<String, SocketAddr>>>>;