From c8e223287590095f98e2b28ffd6b82d191cafcd1 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Fri, 3 Sep 2021 14:17:07 +0800 Subject: [PATCH] Reduce panic --- src/executor/query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/executor/query.rs b/src/executor/query.rs index 1c2ce4a1..a817a9ce 100644 --- a/src/executor/query.rs +++ b/src/executor/query.rs @@ -59,9 +59,9 @@ impl fmt::Debug for QueryResultRow { #[cfg(feature = "sqlx-mysql")] Self::SqlxMySql(row) => write!(f, "{:?}", row), #[cfg(feature = "sqlx-postgres")] - Self::SqlxPostgres(_) => panic!("QueryResultRow::SqlxPostgres cannot be inspected"), + Self::SqlxPostgres(_) => write!("QueryResultRow::SqlxPostgres cannot be inspected"), #[cfg(feature = "sqlx-sqlite")] - Self::SqlxSqlite(_) => panic!("QueryResultRow::SqlxSqlite cannot be inspected"), + Self::SqlxSqlite(_) => write!("QueryResultRow::SqlxSqlite cannot be inspected"), #[cfg(feature = "mock")] Self::Mock(row) => write!(f, "{:?}", row), }