Skip to content

Commit

Permalink
remove 'struct' requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Mar 23, 2023
1 parent 4afe61e commit 82412ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/src/generator/models/partial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ pub fn model_macro<'a>(model: &'a dml::Model, module_path: &TokenStream) -> Toke
quote! {
#[macro_export]
macro_rules! #macro_name {
($vis:vis struct $struct_name:ident {
($struct_name:ident {
$($scalar_field:ident)+
}) => {
$vis struct $struct_name {
pub struct $struct_name {
$(pub $scalar_field: Option<#model_module::partial!(@field_type; $scalar_field)>),+
}

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/tests/partial.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{db::*, utils::*};

user::partial!(struct UserPartialType {
user::partial!(UserPartialType {
name
email
});
Expand Down

0 comments on commit 82412ac

Please sign in to comment.