diff --git a/acrate_database/src/macros.rs b/acrate_database/src/macros.rs index 521df6e..4b1f97f 100644 --- a/acrate_database/src/macros.rs +++ b/acrate_database/src/macros.rs @@ -1,7 +1,7 @@ /// Implement `to_insert` and `to_inserted_async` for the given `$insert_type`, resulting in the given `$result_type`, adding a record to `$table_type`. #[macro_export] macro_rules! impl_to_insert { - ($insert_type:ty => $table_type:expr => $result_type:ty) => { + ($insert_type:ty => $result_type:ty: $table_type:expr) => { impl $insert_type { /// Syncronously insert the record into the table, returning the full inserted record. pub fn to_inserted(self, conn: &mut diesel::pg::PgConnection) -> diesel::QueryResult<$result_type> { diff --git a/acrate_database/src/meta.rs b/acrate_database/src/meta.rs index 618e301..5444a55 100644 --- a/acrate_database/src/meta.rs +++ b/acrate_database/src/meta.rs @@ -560,9 +560,9 @@ impl MetaProperty { } } -impl_to_insert!(MetaSubjectInsert => schema::meta_subjects::table => MetaSubject); -impl_to_insert!(MetaAliasInsert => schema::meta_aliases::table => MetaAlias); -impl_to_insert!(MetaLinkInsert => schema::meta_links::table => MetaLink); -impl_to_insert!(MetaLinkPropertyInsert => schema::meta_link_properties::table => MetaLinkProperty); -impl_to_insert!(MetaLinkTitleInsert => schema::meta_link_titles::table => MetaLinkTitle); -impl_to_insert!(MetaPropertyInsert => schema::meta_properties::table => MetaProperty); +impl_to_insert!(MetaSubjectInsert => MetaSubject: schema::meta_subjects::table); +impl_to_insert!(MetaAliasInsert => MetaAlias: schema::meta_aliases::table); +impl_to_insert!(MetaLinkInsert => MetaLink: schema::meta_links::table); +impl_to_insert!(MetaLinkPropertyInsert => MetaLinkProperty: schema::meta_link_properties::table); +impl_to_insert!(MetaLinkTitleInsert => MetaLinkTitle: schema::meta_link_titles::table); +impl_to_insert!(MetaPropertyInsert => MetaProperty: schema::meta_properties::table);