Skip to content

Commit

Permalink
Try missing docs (CI should fail)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Mar 10, 2023
1 parent 6321073 commit 83356bf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions sea-orm-macros/src/derives/active_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ impl ActiveEnum {
.collect();

quote!(
#[doc = " Generated by sea-orm-macros"]

#[derive(Debug, Clone, PartialEq, Eq, sea_orm::EnumIter)]
pub enum #enum_variant_iden {
#(
#[doc = " Generated by sea-orm-macros"]

#enum_variants,
)*
}
Expand All @@ -278,7 +278,7 @@ impl ActiveEnum {

#[automatically_derived]
impl #ident {
#[doc = " Generated by sea-orm-macros"]

pub fn iden_values() -> Vec<sea_orm::sea_query::DynIden> {
<#enum_variant_iden as sea_orm::strum::IntoEnumIterator>::iter()
.map(|v| sea_orm::sea_query::SeaRc::new(v) as sea_orm::sea_query::DynIden)
Expand All @@ -300,7 +300,7 @@ impl ActiveEnum {
};

quote!(
#[doc = " Generated by sea-orm-macros"]

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct #enum_name_iden;

Expand Down
4 changes: 2 additions & 2 deletions sea-orm-macros/src/derives/active_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ fn derive_active_model(all_fields: IntoIter<Field>) -> syn::Result<TokenStream>
let ty: Vec<Type> = fields.into_iter().map(|Field { ty, .. }| ty).collect();

Ok(quote!(
#[doc = " Generated by sea-orm-macros"]

#[derive(Clone, Debug, PartialEq)]
pub struct ActiveModel {

#(
#[doc = " Generated by sea-orm-macros"]

pub #field: sea_orm::ActiveValue<#ty>
),*
}
Expand Down
12 changes: 6 additions & 6 deletions sea-orm-macros/src/derives/entity_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
.as_ref()
.map(|table_name| {
quote! {
#[doc = " Generated by sea-orm-macros"]

#[derive(Copy, Clone, Default, Debug, sea_orm::prelude::DeriveEntity)]
pub struct Entity;

Expand Down Expand Up @@ -73,7 +73,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
if let Some(table_name) = table_name {
let table_field_name = Ident::new("Table", Span::call_site());
columns_enum.push(quote! {
#[doc = " Generated by sea-orm-macros"]

#[sea_orm(table_name=#table_name)]
#[strum(disabled)]
#table_field_name
Expand Down Expand Up @@ -228,10 +228,10 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
let variant_attrs = match &column_name {
Some(column_name) => quote! {
#[sea_orm(column_name = #column_name)]
#[doc = " Generated by sea-orm-macros"]

},
None => quote! {
#[doc = " Generated by sea-orm-macros"]

},
};

Expand Down Expand Up @@ -365,7 +365,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
quote! { (#primary_key_types) }
};
quote! {
#[doc = " Generated by sea-orm-macros"]

#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
pub enum PrimaryKey {
#primary_keys
Expand All @@ -383,7 +383,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
};

Ok(quote! {
#[doc = " Generated by sea-orm-macros"]

#[derive(Copy, Clone, Debug, sea_orm::prelude::EnumIter, sea_orm::prelude::DeriveColumn)]
pub enum Column {
#columns_enum
Expand Down

0 comments on commit 83356bf

Please sign in to comment.