From 9dfc481c3b2c195bf2f694d363b59f1d447664c6 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Fri, 4 Nov 2022 19:14:31 +0800 Subject: [PATCH] Fix clippy warnings (#1188) * Fix clippy warnings * More fixes --- sea-orm-cli/src/commands/generate.rs | 2 +- sea-orm-macros/src/derives/entity_model.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sea-orm-cli/src/commands/generate.rs b/sea-orm-cli/src/commands/generate.rs index 1686e878b..b1d0971b8 100644 --- a/sea-orm-cli/src/commands/generate.rs +++ b/sea-orm-cli/src/commands/generate.rs @@ -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 diff --git a/sea-orm-macros/src/derives/entity_model.rs b/sea-orm-macros/src/derives/entity_model.rs index 193e6e993..b1a0ea842 100644 --- a/sea-orm-macros/src/derives/entity_model.rs +++ b/sea-orm-macros/src/derives/entity_model.rs @@ -83,7 +83,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec) -> 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());