Skip to content

Commit

Permalink
fix unreachable pattern warn
Browse files Browse the repository at this point in the history
  • Loading branch information
pxp9 committed Apr 14, 2024
1 parent 38d6632 commit 10416fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fang/src/asynk/async_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!"),
}
}
Expand All @@ -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!"),
}
}
Expand All @@ -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!"),
}
}
Expand Down Expand Up @@ -260,6 +263,7 @@ async fn get_backend(

Ok((BackendSqlX::Sqlite, InternalPool::Sqlite(pool)))
}
#[allow(unreachable_patterns)]
_ => panic!("Not a valid backend"),
}
}
Expand Down

0 comments on commit 10416fe

Please sign in to comment.