Skip to content

Commit

Permalink
fix: Put quote! inside a function with #[rustfmt::skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
TmLev committed Nov 8, 2023
1 parent 761611f commit c66b2f1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sea-orm-codegen/src/entity/active_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ mod tests {
&bonus_derive(["specta::Type", "ts_rs::TS"])
)
.to_string(),
build_generated_enum(),
);

#[rustfmt::skip]
fn build_generated_enum() -> String {
quote!(
#[rustfmt::skip]
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, specta :: Type, ts_rs :: TS)]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "media_type")]
pub enum MediaType {
Expand All @@ -141,6 +145,6 @@ mod tests {
}
)
.to_string()
)
}
}
}

0 comments on commit c66b2f1

Please sign in to comment.