From 10416fec1cf5cbb0d18219c551a949fb9ee9b733 Mon Sep 17 00:00:00 2001 From: pxp9 <48651252+pxp9@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:47:16 +0200 Subject: [PATCH] fix unreachable pattern warn --- fang/src/asynk/async_queue.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fang/src/asynk/async_queue.rs b/fang/src/asynk/async_queue.rs index 5374fd3..3d5e97f 100644 --- a/fang/src/asynk/async_queue.rs +++ b/fang/src/asynk/async_queue.rs @@ -169,6 +169,7 @@ impl InternalPool { pub(crate) fn unwrap_pg_pool(&self) -> &PgPool { match self { InternalPool::Pg(pool) => pool, + #[allow(unreachable_patterns)] _ => panic!("Not a PgPool!"), } } @@ -177,6 +178,7 @@ impl InternalPool { pub(crate) fn unwrap_mysql_pool(&self) -> &MySqlPool { match self { InternalPool::MySql(pool) => pool, + #[allow(unreachable_patterns)] _ => panic!("Not a MySqlPool!"), } } @@ -185,6 +187,7 @@ impl InternalPool { pub(crate) fn unwrap_sqlite_pool(&self) -> &SqlitePool { match self { InternalPool::Sqlite(pool) => pool, + #[allow(unreachable_patterns)] _ => panic!("Not a SqlitePool!"), } } @@ -260,6 +263,7 @@ async fn get_backend( Ok((BackendSqlX::Sqlite, InternalPool::Sqlite(pool))) } + #[allow(unreachable_patterns)] _ => panic!("Not a valid backend"), } }