diff options
Diffstat (limited to 'crates/whirl_server/src/interaction/shared.rs')
| -rw-r--r-- | crates/whirl_server/src/interaction/shared.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/whirl_server/src/interaction/shared.rs b/crates/whirl_server/src/interaction/shared.rs index eb712b4..fc8674e 100644 --- a/crates/whirl_server/src/interaction/shared.rs +++ b/crates/whirl_server/src/interaction/shared.rs @@ -1,19 +1,13 @@ // Copyright (C) 2021-2021 The Whirlsplash Collective // SPDX-License-Identifier: GPL-3.0-only -use std::collections::HashMap; - -use bytes::BytesMut; +use {bytes::BytesMut, std::collections::HashMap}; pub struct Shared { pub peers: HashMap<String, tokio::sync::mpsc::UnboundedSender<BytesMut>>, } impl Shared { - pub fn new() -> Self { - Self { - peers: HashMap::new(), - } - } + pub fn new() -> Self { Self { peers: HashMap::new() } } pub async fn broadcast(&mut self, message: &[u8]) { for peer in &mut self.peers { |