From bf1663506aa2349c756f3714feb7beba84de6a85 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Wed, 20 Oct 2021 12:25:26 +0800 Subject: [PATCH] Fix clippy warnings --- sea-orm-macros/src/derives/active_enum.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sea-orm-macros/src/derives/active_enum.rs b/sea-orm-macros/src/derives/active_enum.rs index cd2e1c0a..6823405d 100644 --- a/sea-orm-macros/src/derives/active_enum.rs +++ b/sea-orm-macros/src/derives/active_enum.rs @@ -205,6 +205,7 @@ impl ActiveEnum { } #[automatically_derived] + #[allow(clippy::from_over_into)] impl Into for #ident { fn into(self) -> sea_query::Value { ::to_value(&self).into() @@ -215,7 +216,7 @@ impl ActiveEnum { impl sea_orm::TryGetable for #ident { fn try_get(res: &sea_orm::QueryResult, pre: &str, col: &str) -> Result { let value = <::Value as sea_orm::TryGetable>::try_get(res, pre, col)?; - ::try_from_value(&value).map_err(|e| sea_orm::TryGetError::DbErr(e)) + ::try_from_value(&value).map_err(sea_orm::TryGetError::DbErr) } }