Run fmt --all
This commit is contained in:
parent
e0023611a2
commit
870ca3ffb0
@ -150,13 +150,11 @@ pub fn derive_model(input: TokenStream) -> TokenStream {
|
||||
/// ### Usage
|
||||
///
|
||||
/// ```
|
||||
///
|
||||
/// #[derive(Clone, Debug, PartialEq, DeriveModel, DeriveActiveModel)]
|
||||
/// pub struct Model {
|
||||
/// pub id: i32,
|
||||
/// pub name: String,
|
||||
/// }
|
||||
///
|
||||
/// ```
|
||||
#[proc_macro_derive(DeriveActiveModel, attributes(sea_orm))]
|
||||
pub fn derive_active_model(input: TokenStream) -> TokenStream {
|
||||
@ -183,7 +181,9 @@ pub fn derive_into_active_model(input: TokenStream) -> TokenStream {
|
||||
/// ```
|
||||
/// use sea_orm::entity::prelude::*;
|
||||
///
|
||||
/// #[derive(Clone, Debug, PartialEq, DeriveModel, DeriveActiveModel, DeriveActiveModelBehavior,)]
|
||||
/// #[derive(
|
||||
/// Clone, Debug, PartialEq, DeriveModel, DeriveActiveModel, DeriveActiveModelBehavior,
|
||||
/// )]
|
||||
/// pub struct Model {
|
||||
/// pub id: i32,
|
||||
/// pub name: String,
|
||||
|
@ -211,6 +211,8 @@ pub trait ActiveModelTrait: Clone + Debug {
|
||||
///
|
||||
/// ### Example
|
||||
/// ```
|
||||
/// use sea_orm::entity::prelude::*;
|
||||
///
|
||||
/// /// Derive the active
|
||||
/// #[derive(Clone, Debug, PartialEq, DeriveModel, DeriveActiveModel)]
|
||||
/// pub struct Model {
|
||||
@ -220,7 +222,6 @@ pub trait ActiveModelTrait: Clone + Debug {
|
||||
/// }
|
||||
/// ```
|
||||
/// impl ActiveModelBehavior for ActiveModel {}
|
||||
///
|
||||
#[allow(unused_variables)]
|
||||
pub trait ActiveModelBehavior: ActiveModelTrait {
|
||||
/// Create a new ActiveModel with default values. Also used by `Default::default()`.
|
||||
|
@ -37,7 +37,6 @@ pub trait EntityName: IdenStatic + Default {
|
||||
}
|
||||
}
|
||||
|
||||
/// FIXME Add docs for manual impl
|
||||
/// An Entity implementing `EntityTrait` represents a table in a database.
|
||||
///
|
||||
/// This trait provides an API for you to inspect it's properties
|
||||
@ -79,7 +78,7 @@ pub trait EntityTrait: EntityName {
|
||||
RelationBuilder::from_rel(RelationType::HasOne, R::to().rev(), true)
|
||||
}
|
||||
|
||||
/// Chech if the Entity has many relations
|
||||
/// Check if the Entity has many relations
|
||||
fn has_many<R>(_: R) -> RelationBuilder<Self, R>
|
||||
where
|
||||
R: EntityTrait + Related<Self>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user