Fix clippy warnings (#2379)

* Fix clippy warnings

* fmt

* Disable loco example CI for now
This commit is contained in:
Billy Chan 2024-10-04 16:12:21 +08:00 committed by GitHub
parent 039e4423d3
commit b3db9dec3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 12 deletions

View File

@ -239,12 +239,12 @@ jobs:
examples/basic,
examples/graphql_example,
examples/jsonrpsee_example,
examples/loco_example,
examples/loco_starter,
examples/loco_seaography,
# examples/loco_example,
# examples/loco_starter,
# examples/loco_seaography,
examples/poem_example,
examples/proxy_gluesql_example,
examples/react_admin,
# examples/react_admin,
examples/rocket_example,
examples/rocket_okapi_example,
examples/salvo_example,

View File

@ -57,7 +57,7 @@ impl EntityTransformer {
> 0;
col
})
.map(|col| {
.inspect(|col| {
if let sea_query::ColumnType::Enum { name, variants } = col.get_inner_col_type()
{
enums.insert(
@ -68,7 +68,6 @@ impl EntityTransformer {
},
);
}
col
})
.collect();
let mut ref_table_counts: BTreeMap<String, usize> = BTreeMap::new();

View File

@ -144,11 +144,7 @@ where
continue;
}
let stmt = Index::create()
.name(&format!(
"idx-{}-{}",
entity.to_string(),
column.to_string()
))
.name(format!("idx-{}-{}", entity.to_string(), column.to_string()))
.table(entity)
.col(column)
.to_owned();
@ -177,7 +173,7 @@ where
for primary_key in E::PrimaryKey::iter() {
idx_pk.col(primary_key);
}
stmt.primary_key(idx_pk.name(&format!("pk-{}", entity.to_string())).primary());
stmt.primary_key(idx_pk.name(format!("pk-{}", entity.to_string())).primary());
}
for relation in E::Relation::iter() {