We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
impl Debug for PoolConnection
1 parent 3ab3029 commit 13d1c01Copy full SHA for 13d1c01
sqlx-core/src/pool/connection.rs
@@ -48,8 +48,11 @@ const EXPECT_MSG: &str = "BUG: inner connection already taken!";
48
49
impl<DB: Database> Debug for PoolConnection<DB> {
50
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
51
- // TODO: Show the type name of the connection ?
52
- f.debug_struct("PoolConnection").finish()
+ f
+ .debug_struct("PoolConnection")
53
+ .field("database", &DB::NAME)
54
+ .field("id", &self.live.as_ref().map(|live| live.id))
55
+ .finish()
56
}
57
58
0 commit comments