X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_views_actor%2Fsrc%2Fcomment_reply_view.rs;h=08cc5a45118a2278cd4b8a33bb7ef6cce9271ca8;hb=1d38aad9d3d51ef606074d5b49a8030c49dd0e9e;hp=42c3a53e01ae4dad23f1d4aef5f4693d7c5644c1;hpb=73492af4b09448684ffde3d55454434ec3ed490b;p=lemmy.git diff --git a/crates/db_views_actor/src/comment_reply_view.rs b/crates/db_views_actor/src/comment_reply_view.rs index 42c3a53e..08cc5a45 100644 --- a/crates/db_views_actor/src/comment_reply_view.rs +++ b/crates/db_views_actor/src/comment_reply_view.rs @@ -55,7 +55,7 @@ type CommentReplyViewTuple = ( impl CommentReplyView { pub async fn read( - pool: &DbPool, + pool: &mut DbPool<'_>, comment_reply_id: CommentReplyId, my_person_id: Option, ) -> Result { @@ -155,7 +155,10 @@ impl CommentReplyView { } /// Gets the number of unread replies - pub async fn get_unread_replies(pool: &DbPool, my_person_id: PersonId) -> Result { + pub async fn get_unread_replies( + pool: &mut DbPool<'_>, + my_person_id: PersonId, + ) -> Result { use diesel::dsl::count; let conn = &mut get_conn(pool).await?; @@ -174,9 +177,9 @@ impl CommentReplyView { #[derive(TypedBuilder)] #[builder(field_defaults(default))] -pub struct CommentReplyQuery<'a> { +pub struct CommentReplyQuery<'a, 'b: 'a> { #[builder(!default)] - pool: &'a DbPool, + pool: &'a mut DbPool<'b>, my_person_id: Option, recipient_id: Option, sort: Option, @@ -186,7 +189,7 @@ pub struct CommentReplyQuery<'a> { limit: Option, } -impl<'a> CommentReplyQuery<'a> { +impl<'a, 'b: 'a> CommentReplyQuery<'a, 'b> { pub async fn list(self) -> Result, Error> { let conn = &mut get_conn(self.pool).await?;