Fix clippy warnings (#2379)
* Fix clippy warnings * fmt * Disable loco example CI for now
This commit is contained in:
parent
039e4423d3
commit
b3db9dec3a
8
.github/workflows/rust.yml
vendored
8
.github/workflows/rust.yml
vendored
@ -239,12 +239,12 @@ jobs:
|
|||||||
examples/basic,
|
examples/basic,
|
||||||
examples/graphql_example,
|
examples/graphql_example,
|
||||||
examples/jsonrpsee_example,
|
examples/jsonrpsee_example,
|
||||||
examples/loco_example,
|
# examples/loco_example,
|
||||||
examples/loco_starter,
|
# examples/loco_starter,
|
||||||
examples/loco_seaography,
|
# examples/loco_seaography,
|
||||||
examples/poem_example,
|
examples/poem_example,
|
||||||
examples/proxy_gluesql_example,
|
examples/proxy_gluesql_example,
|
||||||
examples/react_admin,
|
# examples/react_admin,
|
||||||
examples/rocket_example,
|
examples/rocket_example,
|
||||||
examples/rocket_okapi_example,
|
examples/rocket_okapi_example,
|
||||||
examples/salvo_example,
|
examples/salvo_example,
|
||||||
|
@ -57,7 +57,7 @@ impl EntityTransformer {
|
|||||||
> 0;
|
> 0;
|
||||||
col
|
col
|
||||||
})
|
})
|
||||||
.map(|col| {
|
.inspect(|col| {
|
||||||
if let sea_query::ColumnType::Enum { name, variants } = col.get_inner_col_type()
|
if let sea_query::ColumnType::Enum { name, variants } = col.get_inner_col_type()
|
||||||
{
|
{
|
||||||
enums.insert(
|
enums.insert(
|
||||||
@ -68,7 +68,6 @@ impl EntityTransformer {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
col
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
let mut ref_table_counts: BTreeMap<String, usize> = BTreeMap::new();
|
let mut ref_table_counts: BTreeMap<String, usize> = BTreeMap::new();
|
||||||
|
@ -144,11 +144,7 @@ where
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let stmt = Index::create()
|
let stmt = Index::create()
|
||||||
.name(&format!(
|
.name(format!("idx-{}-{}", entity.to_string(), column.to_string()))
|
||||||
"idx-{}-{}",
|
|
||||||
entity.to_string(),
|
|
||||||
column.to_string()
|
|
||||||
))
|
|
||||||
.table(entity)
|
.table(entity)
|
||||||
.col(column)
|
.col(column)
|
||||||
.to_owned();
|
.to_owned();
|
||||||
@ -177,7 +173,7 @@ where
|
|||||||
for primary_key in E::PrimaryKey::iter() {
|
for primary_key in E::PrimaryKey::iter() {
|
||||||
idx_pk.col(primary_key);
|
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() {
|
for relation in E::Relation::iter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user