Fix clippy warnings (#1188)

* Fix clippy warnings

* More fixes
This commit is contained in:
Billy Chan 2022-11-04 19:14:31 +08:00 committed by GitHub
parent 9af5885632
commit 9dfc481c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ pub async fn run_generate_command(
// Closures for filtering tables
let filter_tables = |table: &str| -> bool {
if !tables.is_empty() {
return tables.contains(&table);
return tables.contains(table);
}
true

View File

@ -83,7 +83,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
if let Fields::Named(fields) = item_struct.fields {
for field in fields.named {
if let Some(ident) = &field.ident {
let original_field_name = trim_starting_raw_identifier(&ident);
let original_field_name = trim_starting_raw_identifier(ident);
let mut field_name =
Ident::new(&original_field_name.to_camel_case(), Span::call_site());