From 9f540b770c2937d2cb6b45f69447006e40730549 Mon Sep 17 00:00:00 2001 From: Dopplerian Date: Mon, 15 Apr 2024 15:57:01 +0200 Subject: [PATCH] worst clippy fix of all time --- fang/src/asynk/backend_sqlx.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fang/src/asynk/backend_sqlx.rs b/fang/src/asynk/backend_sqlx.rs index 8f9079f..144e871 100644 --- a/fang/src/asynk/backend_sqlx.rs +++ b/fang/src/asynk/backend_sqlx.rs @@ -38,6 +38,10 @@ pub(crate) enum BackendSqlX { #[cfg(feature = "asynk-mysql")] MySql, + + #[cfg(not(any(feature = "asynk-postgres", feature = "asynk-sqlite", feature = "asynk-mysql")))] + #[allow(dead_code)] + Dummy, } #[allow(dead_code)] @@ -105,6 +109,8 @@ impl BackendSqlX { BackendSqlX::MySql => { BackendSqlXMySQL::execute_query(_query, _pool.unwrap_mysql_pool(), _params).await } + #[cfg(not(any(feature = "asynk-postgres", feature = "asynk-sqlite", feature = "asynk-mysql")))] + BackendSqlX::Dummy => unreachable!(), } } @@ -117,6 +123,8 @@ impl BackendSqlX { BackendSqlX::Sqlite => BackendSqlXSQLite::_name(), #[cfg(feature = "asynk-mysql")] BackendSqlX::MySql => BackendSqlXMySQL::_name(), + #[cfg(not(any(feature = "asynk-postgres", feature = "asynk-sqlite", feature = "asynk-mysql")))] + BackendSqlX::Dummy => unreachable!(), } } }