Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Mar 10, 2023
1 parent 74b437d commit 418f7d6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
16 changes: 16 additions & 0 deletions build-tools/rustfmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

if [ ! -d ./build-tools ]; then

echo "Please execute this script from the repository root."
exit 1

fi

crates=(`find . -type f -name 'Cargo.toml'`)
for crate in "${crates[@]}"; do
echo "cargo +nightly fmt --manifest-path ${crate}"
cargo +nightly fmt --manifest-path "${crate}"
done
12 changes: 3 additions & 9 deletions examples/mysql/src/entities/actor.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
use sea_orm::entity::prelude::*;

#[derive(
Clone,
Debug,
PartialEq,
DeriveEntityModel,
async_graphql::SimpleObject,
)]
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, async_graphql::SimpleObject)]
#[sea_orm(table_name = "actor")]
#[graphql(complex)]
#[graphql(name = "Actor")]
Expand Down Expand Up @@ -238,7 +232,7 @@ impl seaography::EntityOrderBy<Entity> for OrderBy {
} else {
stmt
};

if let Some(order_by) = self.last_update {
match order_by {
seaography::OrderByEnum::Asc => {
Expand All @@ -257,4 +251,4 @@ impl seaography::EnhancedEntity for Entity {
type Entity = Entity;
type Filter = Filter;
type OrderBy = OrderBy;
}
}
1 change: 0 additions & 1 deletion examples/mysql/tests/query_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub async fn get_schema() -> Schema<QueryRoot, EmptyMutation, EmptySubscription>
},
tokio::spawn,
);


Schema::build(QueryRoot, EmptyMutation, EmptySubscription)
.data(database)
Expand Down
1 change: 0 additions & 1 deletion examples/postgres/tests/query_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub async fn get_schema() -> Schema<QueryRoot, EmptyMutation, EmptySubscription>
},
tokio::spawn,
);


Schema::build(QueryRoot, EmptyMutation, EmptySubscription)
.data(database)
Expand Down
1 change: 0 additions & 1 deletion examples/sqlite/tests/query_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub async fn get_schema() -> Schema<QueryRoot, EmptyMutation, EmptySubscription>
},
tokio::spawn,
);


Schema::build(QueryRoot, EmptyMutation, EmptySubscription)
.data(database)
Expand Down

0 comments on commit 418f7d6

Please sign in to comment.