]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/impls/post_report.rs
Diesel 2.0.0 upgrade (#2452)
[lemmy.git] / crates / db_schema / src / impls / post_report.rs
index 58e2f44b0adb26f1ec07b962ce4c831702f1d357..f9a1eab200af82cbd9d92097034ee9b5cd1ecdae 100644 (file)
@@ -14,7 +14,7 @@ impl Reportable for PostReport {
   ///
   /// * `conn` - the postgres connection
   /// * `post_report_form` - the filled CommentReportForm to insert
-  fn report(conn: &PgConnection, post_report_form: &PostReportForm) -> Result<Self, Error> {
+  fn report(conn: &mut PgConnection, post_report_form: &PostReportForm) -> Result<Self, Error> {
     use crate::schema::post_report::dsl::*;
     insert_into(post_report)
       .values(post_report_form)
@@ -27,7 +27,7 @@ impl Reportable for PostReport {
   /// * `report_id` - the id of the report to resolve
   /// * `by_resolver_id` - the id of the user resolving the report
   fn resolve(
-    conn: &PgConnection,
+    conn: &mut PgConnection,
     report_id: Self::IdType,
     by_resolver_id: PersonId,
   ) -> Result<usize, Error> {
@@ -47,7 +47,7 @@ impl Reportable for PostReport {
   /// * `report_id` - the id of the report to unresolve
   /// * `by_resolver_id` - the id of the user unresolving the report
   fn unresolve(
-    conn: &PgConnection,
+    conn: &mut PgConnection,
     report_id: Self::IdType,
     by_resolver_id: PersonId,
   ) -> Result<usize, Error> {