mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-27 05:11:32 +00:00
fmt
This commit is contained in:
parent
5e1a98cc9f
commit
0c487a65eb
2 changed files with 9 additions and 4 deletions
|
@ -127,7 +127,9 @@ pub struct LanguageId(pub i32);
|
||||||
/// The comment reply id.
|
/// The comment reply id.
|
||||||
pub struct CommentReplyId(i32);
|
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", derive(DieselNewType, TS))]
|
||||||
#[cfg_attr(feature = "full", ts(export))]
|
#[cfg_attr(feature = "full", ts(export))]
|
||||||
/// The instance id.
|
/// The instance id.
|
||||||
|
|
|
@ -164,8 +164,11 @@ mod test {
|
||||||
};
|
};
|
||||||
use lemmy_utils::error::LemmyError;
|
use lemmy_utils::error::LemmyError;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::{
|
||||||
use tokio::{spawn, time::sleep};use std::collections::HashSet;
|
collections::HashSet,
|
||||||
|
sync::{Arc, Mutex},
|
||||||
|
};
|
||||||
|
use tokio::{spawn, time::sleep};
|
||||||
|
|
||||||
struct TestData {
|
struct TestData {
|
||||||
send_manager: SendManager,
|
send_manager: SendManager,
|
||||||
|
@ -228,7 +231,7 @@ mod test {
|
||||||
data.run().await?;
|
data.run().await?;
|
||||||
assert_eq!(3, data.send_manager.workers.len());
|
assert_eq!(3, data.send_manager.workers.len());
|
||||||
let workers: HashSet<_> = data.send_manager.workers.keys().cloned().collect();
|
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);
|
assert_eq!(instances, workers);
|
||||||
|
|
||||||
data.cleanup().await?;
|
data.cleanup().await?;
|
||||||
|
|
Loading…
Reference in a new issue