@@ -25,10 +25,10 @@ use crate::{
2525 } ,
2626 cmap:: {
2727 conn:: {
28+ pooled:: PooledConnection ,
2829 wire:: { next_request_id, Message } ,
2930 PinnedConnectionHandle ,
3031 } ,
31- Connection ,
3232 ConnectionPool ,
3333 RawCommandResponse ,
3434 } ,
@@ -193,7 +193,7 @@ impl Client {
193193 pub ( crate ) fn pin_connection_for_cursor (
194194 & self ,
195195 spec : & CursorSpecification ,
196- conn : & mut Connection ,
196+ conn : & mut PooledConnection ,
197197 ) -> Result < Option < PinnedConnectionHandle > > {
198198 if self . is_load_balanced ( ) && spec. info . id != 0 {
199199 Ok ( Some ( conn. pin ( ) ?) )
@@ -205,7 +205,7 @@ impl Client {
205205 fn pin_connection_for_session (
206206 & self ,
207207 spec : & CursorSpecification ,
208- conn : & mut Connection ,
208+ conn : & mut PooledConnection ,
209209 session : & mut ClientSession ,
210210 ) -> Result < Option < PinnedConnectionHandle > > {
211211 if let Some ( handle) = session. transaction . pinned_connection ( ) {
@@ -489,7 +489,7 @@ impl Client {
489489 async fn execute_operation_on_connection < T : Operation > (
490490 & self ,
491491 op : & mut T ,
492- connection : & mut Connection ,
492+ connection : & mut PooledConnection ,
493493 session : & mut Option < & mut ClientSession > ,
494494 txn_number : Option < i64 > ,
495495 retryability : Retryability ,
@@ -904,7 +904,7 @@ impl Client {
904904 /// Returns the retryability level for the execution of this operation on this connection.
905905 fn get_retryability < T : Operation > (
906906 & self ,
907- conn : & Connection ,
907+ conn : & PooledConnection ,
908908 op : & T ,
909909 session : & Option < & mut ClientSession > ,
910910 ) -> Result < Retryability > {
@@ -945,7 +945,7 @@ async fn get_connection<T: Operation>(
945945 session : & Option < & mut ClientSession > ,
946946 op : & T ,
947947 pool : & ConnectionPool ,
948- ) -> Result < Connection > {
948+ ) -> Result < PooledConnection > {
949949 let session_pinned = session
950950 . as_ref ( )
951951 . and_then ( |s| s. transaction . pinned_connection ( ) ) ;
@@ -995,7 +995,7 @@ impl Error {
995995 /// ClientSession should be unpinned.
996996 fn add_labels_and_update_pin (
997997 & mut self ,
998- conn : Option < & Connection > ,
998+ conn : Option < & PooledConnection > ,
999999 session : & mut Option < & mut ClientSession > ,
10001000 retryability : Option < Retryability > ,
10011001 ) -> Result < ( ) > {
@@ -1060,7 +1060,7 @@ impl Error {
10601060
10611061struct ExecutionDetails < T : Operation > {
10621062 output : T :: O ,
1063- connection : Connection ,
1063+ connection : PooledConnection ,
10641064 implicit_session : Option < ClientSession > ,
10651065}
10661066
0 commit comments