feat(pool): add more info to impl Debug for PoolConnection

This commit is contained in:
Austin Bonander 2024-11-08 15:52:53 -08:00
parent 8a0f1ab230
commit 98235e646e

View File

@ -49,8 +49,10 @@ const EXPECT_MSG: &str = "BUG: inner connection already taken!";
impl<DB: Database> Debug for PoolConnection<DB> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
// TODO: Show the type name of the connection ?
f.debug_struct("PoolConnection").finish()
f.debug_struct("PoolConnection")
.field("database", &DB::NAME)
.field("id", &self.live.as_ref().map(|live| live.id))
.finish()
}
}