File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1073,7 +1073,7 @@ impl<'env> ConnectionTransitions for Arc<Connection<'env>> {
10731073
10741074 fn into_prepared ( self , query : & str ) -> Result < Self :: Prepared , Error > {
10751075 let stmt = self . prepare ( query) ?;
1076- let stmt_ptr = stmt. into_statement ( ) . into_sys ( ) ;
1076+ let stmt_ptr = stmt. into_handle ( ) . into_sys ( ) ;
10771077 // Safe: The connection is the parent of the statement referenced by `stmt_ptr`.
10781078 let stmt = unsafe { StatementConnection :: new ( stmt_ptr, self ) } ;
10791079 // `stmt` is valid and in prepared state.
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ impl<S> Prepared<S> {
2626 /// [`crate::handles::StatementImpl::into_sys`] or [`crate::handles::Statement::as_sys`] this
2727 /// serves as an escape hatch to access the functionality provided by `crate::sys` not yet
2828 /// accessible through safe abstractions.
29- pub fn into_statement ( self ) -> S {
29+ pub fn into_handle ( self ) -> S {
3030 self . statement
3131 }
3232}
@@ -117,9 +117,7 @@ where
117117 C : ColumnBuffer + HasDataType ,
118118 {
119119 // We know that statement is a prepared statement.
120- unsafe {
121- ColumnarBulkInserter :: new ( self . into_statement ( ) , parameter_buffers, index_mapping)
122- }
120+ unsafe { ColumnarBulkInserter :: new ( self . into_handle ( ) , parameter_buffers, index_mapping) }
123121 }
124122
125123 /// Use this to insert rows of string input into the database.
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl<'env> ConnectionTransitions for SharedConnection<'env> {
5555 . lock ( )
5656 . expect ( "Shared connection lock must not be poisoned" ) ;
5757 let stmt = guard. prepare ( query) ?;
58- let stmt_ptr = stmt. into_statement ( ) . into_sys ( ) ;
58+ let stmt_ptr = stmt. into_handle ( ) . into_sys ( ) ;
5959 drop ( guard) ;
6060 // Safe: The connection is the parent of the statement referenced by `stmt_ptr`.
6161 let stmt = unsafe { StatementConnection :: new ( stmt_ptr, self ) } ;
You can’t perform that action at this time.
0 commit comments