File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " sqlx-tracing"
3- version = " 0.2.0 "
3+ version = " 0.2.1 "
44edition = " 2024"
55description = " OpenTelemetry-compatible tracing for SQLx database operations in Rust."
66license = " MIT"
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ impl<DB: sqlx::Database> PoolBuilder<DB> {
110110/// An asynchronous pool of SQLx database connections with tracing instrumentation.
111111///
112112/// Wraps a SQLx [`Pool`] and propagates tracing attributes to all acquired connections.
113- #[ derive( Clone , Debug ) ]
113+ #[ derive( Debug ) ]
114114pub struct Pool < DB >
115115where
116116 DB : sqlx:: Database ,
@@ -119,14 +119,26 @@ where
119119 attributes : Arc < Attributes > ,
120120}
121121
122+ impl < DB > Clone for Pool < DB >
123+ where
124+ DB : sqlx:: Database ,
125+ {
126+ fn clone ( & self ) -> Self {
127+ Self {
128+ inner : self . inner . clone ( ) ,
129+ attributes : Arc :: clone ( & self . attributes ) ,
130+ }
131+ }
132+ }
133+
122134impl < DB > From < sqlx:: Pool < DB > > for Pool < DB >
123135where
124136 DB : sqlx:: Database ,
125137 PoolBuilder < DB > : From < sqlx:: Pool < DB > > ,
126138{
127139 /// Convert a SQLx [`Pool`] into a tracing-instrumented [`Pool`].
128140 fn from ( inner : sqlx:: Pool < DB > ) -> Self {
129- PoolBuilder :: from ( inner) . build ( )
141+ PoolBuilder :: from ( inner. into ( ) ) . build ( )
130142 }
131143}
132144
You can’t perform that action at this time.
0 commit comments