From edd6c9b3622ed22d77835e4b0de854fddf5b2f22 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Fri, 25 Aug 2023 22:02:33 +0100 Subject: [PATCH] cargo clippy --- sea-orm-codegen/src/entity/base_entity.rs | 2 +- src/database/db_connection.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sea-orm-codegen/src/entity/base_entity.rs b/sea-orm-codegen/src/entity/base_entity.rs index c7a89b96..f261f22e 100644 --- a/sea-orm-codegen/src/entity/base_entity.rs +++ b/sea-orm-codegen/src/entity/base_entity.rs @@ -108,7 +108,7 @@ impl Entity { self.get_relation_enum_name() .into_iter() .chain(self_relations_reverse) - .chain(conjunct_related_names.into_iter()) + .chain(conjunct_related_names) .collect() } diff --git a/src/database/db_connection.rs b/src/database/db_connection.rs index 158cf224..ad2b5690 100644 --- a/src/database/db_connection.rs +++ b/src/database/db_connection.rs @@ -470,6 +470,10 @@ impl DatabaseConnection { impl DbBackend { /// Check if the URI is the same as the specified database backend. /// Returns true if they match. + /// + /// # Panics + /// + /// Panics if `base_url` cannot be parsed as `Url`. pub fn is_prefix_of(self, base_url: &str) -> bool { let base_url_parsed = Url::parse(base_url).expect("Fail to parse database URL"); match self {