aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_server/src/interaction/shared.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-06-03 15:23:14 +0000
committerFuwn <[email protected]>2024-06-03 15:23:14 +0000
commit303ed249037821be0e947b790ecb6090c89cc832 (patch)
tree07d1449bb77f12eae0bd90344eee37440291167b /crates/whirl_server/src/interaction/shared.rs
parentchore(rustfmt): add new rules (diff)
downloadwhirl-303ed249037821be0e947b790ecb6090c89cc832.tar.xz
whirl-303ed249037821be0e947b790ecb6090c89cc832.zip
format: rustfmt with new rules
Diffstat (limited to 'crates/whirl_server/src/interaction/shared.rs')
-rw-r--r--crates/whirl_server/src/interaction/shared.rs10
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 {