From 0c487a65ebf2c5dbd51b2f3d7cfcde9b13bd8251 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 23 May 2024 12:59:20 +0200 Subject: [PATCH] fmt --- crates/db_schema/src/newtypes.rs | 4 +++- crates/federate/src/lib.rs | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/db_schema/src/newtypes.rs b/crates/db_schema/src/newtypes.rs index b099c586f..10abfaec4 100644 --- a/crates/db_schema/src/newtypes.rs +++ b/crates/db_schema/src/newtypes.rs @@ -127,7 +127,9 @@ pub struct LanguageId(pub i32); /// The comment reply id. pub struct CommentReplyId(i32); -#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Serialize, Deserialize, Default, Ord, PartialOrd)] +#[derive( + Debug, Copy, Clone, Hash, Eq, PartialEq, Serialize, Deserialize, Default, Ord, PartialOrd, +)] #[cfg_attr(feature = "full", derive(DieselNewType, TS))] #[cfg_attr(feature = "full", ts(export))] /// The instance id. diff --git a/crates/federate/src/lib.rs b/crates/federate/src/lib.rs index 38c0c235b..11a5ccf15 100644 --- a/crates/federate/src/lib.rs +++ b/crates/federate/src/lib.rs @@ -164,8 +164,11 @@ mod test { }; use lemmy_utils::error::LemmyError; use serial_test::serial; - use std::sync::{Arc, Mutex}; - use tokio::{spawn, time::sleep};use std::collections::HashSet; + use std::{ + collections::HashSet, + sync::{Arc, Mutex}, + }; + use tokio::{spawn, time::sleep}; struct TestData { send_manager: SendManager, @@ -228,7 +231,7 @@ mod test { data.run().await?; assert_eq!(3, data.send_manager.workers.len()); let workers: HashSet<_> = data.send_manager.workers.keys().cloned().collect(); - let instances: HashSet<_> = data.instances.iter().map(|i|i.id).collect(); + let instances: HashSet<_> = data.instances.iter().map(|i| i.id).collect(); assert_eq!(instances, workers); data.cleanup().await?;