aboutsummaryrefslogtreecommitdiff
path: root/server/src/main.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-11 00:24:11 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-11 00:24:11 +0200
commite68a9eb5e9e15372313f9017be4a2d58fb690bfc (patch)
tree690287a2c71d87c2955e992f1e9575166237188a /server/src/main.rs
parent3fe8ba7f1b9fa7e38fa03f55fd898c8ca2a0e996 (diff)
downloadhurrycurry-e68a9eb5e9e15372313f9017be4a2d58fb690bfc.tar
hurrycurry-e68a9eb5e9e15372313f9017be4a2d58fb690bfc.tar.bz2
hurrycurry-e68a9eb5e9e15372313f9017be4a2d58fb690bfc.tar.zst
clippy + fmt; start using if let chains
Diffstat (limited to 'server/src/main.rs')
-rw-r--r--server/src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index be0bb005..93147d45 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -15,13 +15,13 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-use anyhow::{bail, Result};
+use anyhow::{Result, bail};
use clap::Parser;
use futures_util::{SinkExt, StreamExt};
use hurrycurry_locale::trm;
use hurrycurry_protocol::{PacketC, PacketS};
-use hurrycurry_server::{server::Server, ConnectionID};
-use log::{debug, info, trace, warn, LevelFilter};
+use hurrycurry_server::{ConnectionID, server::Server};
+use log::{LevelFilter, debug, info, trace, warn};
use std::{
env::var, net::SocketAddr, path::PathBuf, process::exit, str::FromStr, sync::Arc,
time::Duration,
@@ -29,7 +29,7 @@ use std::{
use tokio::{
net::TcpListener,
spawn,
- sync::{broadcast, mpsc::channel, RwLock},
+ sync::{RwLock, broadcast, mpsc::channel},
time::interval,
};
use tokio_tungstenite::tungstenite::Message;
@@ -315,7 +315,7 @@ async fn run(data_path: PathBuf, args: Args) -> anyhow::Result<()> {
#[cfg(test)]
mod test {
use hurrycurry_protocol::{Character, PacketS, PlayerClass, PlayerID};
- use hurrycurry_server::{server::Server, ConnectionID};
+ use hurrycurry_server::{ConnectionID, server::Server};
use std::future::Future;
use tokio::sync::broadcast;