mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-22 20:43:05 +00:00
Running cargo +nightly fmt.
This commit is contained in:
parent
5d64dfd4dc
commit
dfa9cb57aa
3 changed files with 59 additions and 42 deletions
|
@ -1,9 +1,14 @@
|
||||||
use super::{post::Post};
|
use super::post::Post;
|
||||||
use crate::schema::{comment, comment_like, comment_saved};
|
use crate::{
|
||||||
use url::{ParseError, Url};
|
naive_now,
|
||||||
|
schema::{comment, comment_like, comment_saved},
|
||||||
|
Crud,
|
||||||
|
Likeable,
|
||||||
|
Saveable,
|
||||||
|
};
|
||||||
use diesel::{dsl::*, result::Error, *};
|
use diesel::{dsl::*, result::Error, *};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use crate::{Crud, naive_now, Likeable, Saveable};
|
use url::{ParseError, Url};
|
||||||
|
|
||||||
// WITH RECURSIVE MyTree AS (
|
// WITH RECURSIVE MyTree AS (
|
||||||
// SELECT * FROM comment WHERE parent_id IS NULL
|
// SELECT * FROM comment WHERE parent_id IS NULL
|
||||||
|
@ -252,8 +257,16 @@ impl Saveable<CommentSavedForm> for CommentSaved {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::{comment::*, community::*, post::*, tests::establish_unpooled_connection, user::*, SortType, ListingType};
|
use crate::{
|
||||||
use crate::Crud;
|
comment::*,
|
||||||
|
community::*,
|
||||||
|
post::*,
|
||||||
|
tests::establish_unpooled_connection,
|
||||||
|
user::*,
|
||||||
|
Crud,
|
||||||
|
ListingType,
|
||||||
|
SortType,
|
||||||
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_crud() {
|
fn test_crud() {
|
||||||
|
|
|
@ -78,10 +78,14 @@ impl PasswordResetRequest {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::{super::user::*};
|
use super::super::user::*;
|
||||||
use crate::{tests::establish_unpooled_connection, ListingType, SortType};
|
use crate::{
|
||||||
use crate::password_reset_request::PasswordResetRequest;
|
password_reset_request::PasswordResetRequest,
|
||||||
use crate::Crud;
|
tests::establish_unpooled_connection,
|
||||||
|
Crud,
|
||||||
|
ListingType,
|
||||||
|
SortType,
|
||||||
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_crud() {
|
fn test_crud() {
|
||||||
|
|
|
@ -523,36 +523,36 @@ joinable!(user_mention -> comment (comment_id));
|
||||||
joinable!(user_mention -> user_ (recipient_id));
|
joinable!(user_mention -> user_ (recipient_id));
|
||||||
|
|
||||||
allow_tables_to_appear_in_same_query!(
|
allow_tables_to_appear_in_same_query!(
|
||||||
activity,
|
activity,
|
||||||
category,
|
category,
|
||||||
comment,
|
comment,
|
||||||
comment_aggregates_fast,
|
comment_aggregates_fast,
|
||||||
comment_like,
|
comment_like,
|
||||||
comment_saved,
|
comment_saved,
|
||||||
community,
|
community,
|
||||||
community_aggregates_fast,
|
community_aggregates_fast,
|
||||||
community_follower,
|
community_follower,
|
||||||
community_moderator,
|
community_moderator,
|
||||||
community_user_ban,
|
community_user_ban,
|
||||||
mod_add,
|
mod_add,
|
||||||
mod_add_community,
|
mod_add_community,
|
||||||
mod_ban,
|
mod_ban,
|
||||||
mod_ban_from_community,
|
mod_ban_from_community,
|
||||||
mod_lock_post,
|
mod_lock_post,
|
||||||
mod_remove_comment,
|
mod_remove_comment,
|
||||||
mod_remove_community,
|
mod_remove_community,
|
||||||
mod_remove_post,
|
mod_remove_post,
|
||||||
mod_sticky_post,
|
mod_sticky_post,
|
||||||
password_reset_request,
|
password_reset_request,
|
||||||
post,
|
post,
|
||||||
post_aggregates_fast,
|
post_aggregates_fast,
|
||||||
post_like,
|
post_like,
|
||||||
post_read,
|
post_read,
|
||||||
post_saved,
|
post_saved,
|
||||||
private_message,
|
private_message,
|
||||||
site,
|
site,
|
||||||
user_,
|
user_,
|
||||||
user_ban,
|
user_ban,
|
||||||
user_fast,
|
user_fast,
|
||||||
user_mention,
|
user_mention,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue