From cb753b045fe90294051cc7a09855418f917dcc34 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 2 Nov 2022 15:18:22 -0400 Subject: [PATCH] Group imports dess (#2526) * Group imports with rustfmt * Running cargo fmt again. Co-authored-by: Felix Ableitner --- .rustfmt.toml | 2 +- crates/api_crud/src/comment/update.rs | 3 +- .../src/activities/block/undo_block_user.rs | 29 +++++++++---------- crates/apub/src/activities/voting/mod.rs | 9 +++--- crates/apub/src/collections/mod.rs | 3 +- crates/db_schema/src/aggregates/structs.rs | 3 +- crates/db_schema/src/source/actor_language.rs | 3 +- crates/db_schema/src/source/comment.rs | 5 ++-- crates/db_schema/src/source/comment_reply.rs | 3 +- crates/db_schema/src/source/comment_report.rs | 3 +- crates/db_schema/src/source/community.rs | 5 ++-- .../db_schema/src/source/community_block.rs | 3 +- .../src/source/email_verification.rs | 1 - .../src/source/federation_allowlist.rs | 5 ++-- .../src/source/federation_blocklist.rs | 5 ++-- crates/db_schema/src/source/instance.rs | 3 +- crates/db_schema/src/source/language.rs | 3 +- crates/db_schema/src/source/local_site.rs | 5 ++-- .../src/source/local_site_rate_limit.rs | 5 ++-- crates/db_schema/src/source/local_user.rs | 5 ++-- crates/db_schema/src/source/moderator.rs | 3 +- .../src/source/password_reset_request.rs | 1 - crates/db_schema/src/source/person.rs | 5 ++-- crates/db_schema/src/source/person_block.rs | 3 +- crates/db_schema/src/source/person_mention.rs | 3 +- crates/db_schema/src/source/post.rs | 5 ++-- crates/db_schema/src/source/post_report.rs | 3 +- .../db_schema/src/source/private_message.rs | 5 ++-- .../src/source/private_message_report.rs | 3 +- .../src/source/registration_application.rs | 3 +- crates/db_schema/src/source/site.rs | 5 ++-- crates/utils/src/test.rs | 3 +- 32 files changed, 57 insertions(+), 88 deletions(-) diff --git a/.rustfmt.toml b/.rustfmt.toml index 6bf5e0eda..c539ff0b4 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -2,4 +2,4 @@ tab_spaces = 2 edition="2021" imports_layout="HorizontalVertical" imports_granularity="Crate" -reorder_imports=true +group_imports="One" \ No newline at end of file diff --git a/crates/api_crud/src/comment/update.rs b/crates/api_crud/src/comment/update.rs index f9a18fb30..9678765e9 100644 --- a/crates/api_crud/src/comment/update.rs +++ b/crates/api_crud/src/comment/update.rs @@ -1,3 +1,4 @@ +use crate::PerformCrud; use actix_web::web::Data; use lemmy_api_common::{ comment::{CommentResponse, EditComment}, @@ -35,8 +36,6 @@ use lemmy_websocket::{ UserOperationCrud, }; -use crate::PerformCrud; - #[async_trait::async_trait(?Send)] impl PerformCrud for EditComment { type Response = CommentResponse; diff --git a/crates/apub/src/activities/block/undo_block_user.rs b/crates/apub/src/activities/block/undo_block_user.rs index 6de1d3a17..cd9784f32 100644 --- a/crates/apub/src/activities/block/undo_block_user.rs +++ b/crates/apub/src/activities/block/undo_block_user.rs @@ -1,3 +1,17 @@ +use crate::{ + activities::{ + block::{generate_cc, SiteOrCommunity}, + community::{announce::GetCommunity, send_activity_in_community}, + generate_activity_id, + send_lemmy_activity, + verify_is_public, + }, + activity_lists::AnnouncableActivities, + local_instance, + objects::{community::ApubCommunity, instance::remote_instance_inboxes, person::ApubPerson}, + protocol::activities::block::{block_user::BlockUser, undo_block_user::UndoBlockUser}, + ActorType, +}; use activitypub_federation::{ core::object_id::ObjectId, data::Data, @@ -18,21 +32,6 @@ use lemmy_utils::error::LemmyError; use lemmy_websocket::LemmyContext; use url::Url; -use crate::{ - activities::{ - block::{generate_cc, SiteOrCommunity}, - community::{announce::GetCommunity, send_activity_in_community}, - generate_activity_id, - send_lemmy_activity, - verify_is_public, - }, - activity_lists::AnnouncableActivities, - local_instance, - objects::{community::ApubCommunity, instance::remote_instance_inboxes, person::ApubPerson}, - protocol::activities::block::{block_user::BlockUser, undo_block_user::UndoBlockUser}, - ActorType, -}; - impl UndoBlockUser { #[tracing::instrument(skip_all)] pub async fn send( diff --git a/crates/apub/src/activities/voting/mod.rs b/crates/apub/src/activities/voting/mod.rs index 4896b4c64..6744e1c5f 100644 --- a/crates/apub/src/activities/voting/mod.rs +++ b/crates/apub/src/activities/voting/mod.rs @@ -1,3 +1,7 @@ +use crate::{ + objects::{comment::ApubComment, person::ApubPerson, post::ApubPost}, + protocol::activities::voting::vote::VoteType, +}; use lemmy_api_common::utils::blocking; use lemmy_db_schema::{ source::{ @@ -13,11 +17,6 @@ use lemmy_websocket::{ UserOperation, }; -use crate::{ - objects::{comment::ApubComment, person::ApubPerson, post::ApubPost}, - protocol::activities::voting::vote::VoteType, -}; - pub mod undo_vote; pub mod vote; diff --git a/crates/apub/src/collections/mod.rs b/crates/apub/src/collections/mod.rs index a2e77d1bc..e2a274a01 100644 --- a/crates/apub/src/collections/mod.rs +++ b/crates/apub/src/collections/mod.rs @@ -1,6 +1,5 @@ -use lemmy_websocket::LemmyContext; - use crate::objects::community::ApubCommunity; +use lemmy_websocket::LemmyContext; pub(crate) mod community_moderators; pub(crate) mod community_outbox; diff --git a/crates/db_schema/src/aggregates/structs.rs b/crates/db_schema/src/aggregates/structs.rs index ab87f4580..0cc4dd05e 100644 --- a/crates/db_schema/src/aggregates/structs.rs +++ b/crates/db_schema/src/aggregates/structs.rs @@ -1,6 +1,4 @@ use crate::newtypes::{CommentId, CommunityId, PersonId, PostId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::{ comment_aggregates, @@ -10,6 +8,7 @@ use crate::schema::{ post_aggregates, site_aggregates, }; +use serde::{Deserialize, Serialize}; #[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/actor_language.rs b/crates/db_schema/src/source/actor_language.rs index 8831791e4..6780be51b 100644 --- a/crates/db_schema/src/source/actor_language.rs +++ b/crates/db_schema/src/source/actor_language.rs @@ -7,10 +7,9 @@ use crate::newtypes::{ SiteId, SiteLanguageId, }; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::local_user_language; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/comment.rs b/crates/db_schema/src/source/comment.rs index 5b7ab085b..ed520f1df 100644 --- a/crates/db_schema/src/source/comment.rs +++ b/crates/db_schema/src/source/comment.rs @@ -1,11 +1,10 @@ use crate::newtypes::{CommentId, DbUrl, LanguageId, LtreeDef, PersonId, PostId}; +#[cfg(feature = "full")] +use crate::schema::{comment, comment_like, comment_saved}; use diesel_ltree::Ltree; use serde::{Deserialize, Serialize}; use typed_builder::TypedBuilder; -#[cfg(feature = "full")] -use crate::schema::{comment, comment_like, comment_saved}; - #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] #[cfg_attr(feature = "full", diesel(belongs_to(crate::source::post::Post)))] diff --git a/crates/db_schema/src/source/comment_reply.rs b/crates/db_schema/src/source/comment_reply.rs index 8b7fe51b0..bcce607ed 100644 --- a/crates/db_schema/src/source/comment_reply.rs +++ b/crates/db_schema/src/source/comment_reply.rs @@ -1,8 +1,7 @@ use crate::newtypes::{CommentId, CommentReplyId, PersonId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::comment_reply; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/comment_report.rs b/crates/db_schema/src/source/comment_report.rs index 6cc328d0d..9b55259d9 100644 --- a/crates/db_schema/src/source/comment_report.rs +++ b/crates/db_schema/src/source/comment_report.rs @@ -1,8 +1,7 @@ use crate::newtypes::{CommentId, CommentReportId, PersonId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::comment_report; +use serde::{Deserialize, Serialize}; #[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/community.rs b/crates/db_schema/src/source/community.rs index 6d988ae75..446d92a0e 100644 --- a/crates/db_schema/src/source/community.rs +++ b/crates/db_schema/src/source/community.rs @@ -1,9 +1,8 @@ use crate::newtypes::{CommunityId, DbUrl, InstanceId, PersonId}; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::{community, community_follower, community_moderator, community_person_ban}; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/community_block.rs b/crates/db_schema/src/source/community_block.rs index 8011e9ee5..3efdce4f2 100644 --- a/crates/db_schema/src/source/community_block.rs +++ b/crates/db_schema/src/source/community_block.rs @@ -1,8 +1,7 @@ use crate::newtypes::{CommunityBlockId, CommunityId, PersonId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::community_block; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/email_verification.rs b/crates/db_schema/src/source/email_verification.rs index d541421f2..0ee5b47d0 100644 --- a/crates/db_schema/src/source/email_verification.rs +++ b/crates/db_schema/src/source/email_verification.rs @@ -1,5 +1,4 @@ use crate::newtypes::LocalUserId; - #[cfg(feature = "full")] use crate::schema::email_verification; diff --git a/crates/db_schema/src/source/federation_allowlist.rs b/crates/db_schema/src/source/federation_allowlist.rs index 5ca5927fe..309e24e36 100644 --- a/crates/db_schema/src/source/federation_allowlist.rs +++ b/crates/db_schema/src/source/federation_allowlist.rs @@ -1,9 +1,8 @@ use crate::newtypes::InstanceId; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - #[cfg(feature = "full")] use crate::schema::federation_allowlist; +use serde::{Deserialize, Serialize}; +use std::fmt::Debug; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/federation_blocklist.rs b/crates/db_schema/src/source/federation_blocklist.rs index 70f7a085c..2ee5ec0f0 100644 --- a/crates/db_schema/src/source/federation_blocklist.rs +++ b/crates/db_schema/src/source/federation_blocklist.rs @@ -1,9 +1,8 @@ use crate::newtypes::InstanceId; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - #[cfg(feature = "full")] use crate::schema::federation_blocklist; +use serde::{Deserialize, Serialize}; +use std::fmt::Debug; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/instance.rs b/crates/db_schema/src/source/instance.rs index 0b86f9c60..d58130055 100644 --- a/crates/db_schema/src/source/instance.rs +++ b/crates/db_schema/src/source/instance.rs @@ -1,8 +1,7 @@ use crate::newtypes::InstanceId; -use std::fmt::Debug; - #[cfg(feature = "full")] use crate::schema::instance; +use std::fmt::Debug; #[derive(PartialEq, Eq, Debug)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/language.rs b/crates/db_schema/src/source/language.rs index 3c52eb47b..19dcf4871 100644 --- a/crates/db_schema/src/source/language.rs +++ b/crates/db_schema/src/source/language.rs @@ -1,8 +1,7 @@ use crate::newtypes::LanguageId; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::language; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/local_site.rs b/crates/db_schema/src/source/local_site.rs index 443923a44..79cd3852f 100644 --- a/crates/db_schema/src/source/local_site.rs +++ b/crates/db_schema/src/source/local_site.rs @@ -1,9 +1,8 @@ use crate::newtypes::{LocalSiteId, SiteId}; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::local_site; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/local_site_rate_limit.rs b/crates/db_schema/src/source/local_site_rate_limit.rs index bd8901370..f37f3e2da 100644 --- a/crates/db_schema/src/source/local_site_rate_limit.rs +++ b/crates/db_schema/src/source/local_site_rate_limit.rs @@ -1,9 +1,8 @@ use crate::newtypes::LocalSiteId; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::local_site_rate_limit; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/local_user.rs b/crates/db_schema/src/source/local_user.rs index 04fb4b87b..37a559bc6 100644 --- a/crates/db_schema/src/source/local_user.rs +++ b/crates/db_schema/src/source/local_user.rs @@ -1,9 +1,8 @@ use crate::newtypes::{LocalUserId, PersonId}; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::local_user; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/moderator.rs b/crates/db_schema/src/source/moderator.rs index d234ed990..000e34868 100644 --- a/crates/db_schema/src/source/moderator.rs +++ b/crates/db_schema/src/source/moderator.rs @@ -1,6 +1,4 @@ use crate::newtypes::{CommentId, CommunityId, PersonId, PostId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::{ admin_purge_comment, @@ -19,6 +17,7 @@ use crate::schema::{ mod_sticky_post, mod_transfer_community, }; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/password_reset_request.rs b/crates/db_schema/src/source/password_reset_request.rs index 159b0b7e6..6c28c649a 100644 --- a/crates/db_schema/src/source/password_reset_request.rs +++ b/crates/db_schema/src/source/password_reset_request.rs @@ -1,5 +1,4 @@ use crate::newtypes::LocalUserId; - #[cfg(feature = "full")] use crate::schema::password_reset_request; diff --git a/crates/db_schema/src/source/person.rs b/crates/db_schema/src/source/person.rs index 0d2706c51..9a5a9f7c4 100644 --- a/crates/db_schema/src/source/person.rs +++ b/crates/db_schema/src/source/person.rs @@ -1,9 +1,8 @@ use crate::newtypes::{DbUrl, InstanceId, PersonId}; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::person; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/person_block.rs b/crates/db_schema/src/source/person_block.rs index e5a365b51..f9bd6e565 100644 --- a/crates/db_schema/src/source/person_block.rs +++ b/crates/db_schema/src/source/person_block.rs @@ -1,8 +1,7 @@ use crate::newtypes::{PersonBlockId, PersonId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::person_block; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/person_mention.rs b/crates/db_schema/src/source/person_mention.rs index b4a2ce59c..45892d3ab 100644 --- a/crates/db_schema/src/source/person_mention.rs +++ b/crates/db_schema/src/source/person_mention.rs @@ -1,8 +1,7 @@ use crate::newtypes::{CommentId, PersonId, PersonMentionId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::person_mention; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/post.rs b/crates/db_schema/src/source/post.rs index 9af6a3f29..df3116ef3 100644 --- a/crates/db_schema/src/source/post.rs +++ b/crates/db_schema/src/source/post.rs @@ -1,9 +1,8 @@ use crate::newtypes::{CommunityId, DbUrl, LanguageId, PersonId, PostId}; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::{post, post_like, post_read, post_saved}; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/post_report.rs b/crates/db_schema/src/source/post_report.rs index abee0f32f..a9f3351bf 100644 --- a/crates/db_schema/src/source/post_report.rs +++ b/crates/db_schema/src/source/post_report.rs @@ -1,8 +1,7 @@ use crate::newtypes::{DbUrl, PersonId, PostId, PostReportId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::post_report; +use serde::{Deserialize, Serialize}; #[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)] #[cfg_attr(feature = "full", derive(Identifiable, Queryable, Associations))] diff --git a/crates/db_schema/src/source/private_message.rs b/crates/db_schema/src/source/private_message.rs index f6e969f37..da446ffad 100644 --- a/crates/db_schema/src/source/private_message.rs +++ b/crates/db_schema/src/source/private_message.rs @@ -1,9 +1,8 @@ use crate::newtypes::{DbUrl, PersonId, PrivateMessageId}; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::private_message; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/private_message_report.rs b/crates/db_schema/src/source/private_message_report.rs index 8cf3b0f00..f35b259f3 100644 --- a/crates/db_schema/src/source/private_message_report.rs +++ b/crates/db_schema/src/source/private_message_report.rs @@ -1,8 +1,7 @@ use crate::newtypes::{PersonId, PrivateMessageId, PrivateMessageReportId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::private_message_report; +use serde::{Deserialize, Serialize}; #[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] diff --git a/crates/db_schema/src/source/registration_application.rs b/crates/db_schema/src/source/registration_application.rs index 40f00bdfa..1e26664d8 100644 --- a/crates/db_schema/src/source/registration_application.rs +++ b/crates/db_schema/src/source/registration_application.rs @@ -1,8 +1,7 @@ use crate::newtypes::{LocalUserId, PersonId}; -use serde::{Deserialize, Serialize}; - #[cfg(feature = "full")] use crate::schema::registration_application; +use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/db_schema/src/source/site.rs b/crates/db_schema/src/source/site.rs index 8c4a5b1ca..21a0cd31a 100644 --- a/crates/db_schema/src/source/site.rs +++ b/crates/db_schema/src/source/site.rs @@ -1,9 +1,8 @@ use crate::newtypes::{DbUrl, InstanceId, SiteId}; -use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder; - #[cfg(feature = "full")] use crate::schema::site; +use serde::{Deserialize, Serialize}; +use typed_builder::TypedBuilder; #[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Identifiable))] diff --git a/crates/utils/src/test.rs b/crates/utils/src/test.rs index e7bfdb59d..40e321824 100644 --- a/crates/utils/src/test.rs +++ b/crates/utils/src/test.rs @@ -1,5 +1,3 @@ -use regex::RegexBuilder; - use crate::utils::{ is_valid_actor_name, is_valid_display_name, @@ -10,6 +8,7 @@ use crate::utils::{ slur_check, slurs_vec_to_str, }; +use regex::RegexBuilder; #[test] fn test_mentions_regex() {