diff options
| author | Fuwn <[email protected]> | 2024-06-03 15:23:14 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-03 15:23:14 +0000 |
| commit | 303ed249037821be0e947b790ecb6090c89cc832 (patch) | |
| tree | 07d1449bb77f12eae0bd90344eee37440291167b /crates/whirl_server/src/interaction/shared.rs | |
| parent | chore(rustfmt): add new rules (diff) | |
| download | whirl-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.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 { |