@@ -15,10 +15,10 @@ use crate::{
15
15
use futures_core:: future:: BoxFuture ;
16
16
use futures_core:: stream:: BoxStream ;
17
17
use futures_core:: Stream ;
18
- use futures_util:: { pin_mut , TryStreamExt } ;
18
+ use futures_util:: TryStreamExt ;
19
19
use sqlx_core:: arguments:: Arguments ;
20
20
use sqlx_core:: Either ;
21
- use std:: { borrow:: Cow , sync:: Arc } ;
21
+ use std:: { borrow:: Cow , pin :: pin , sync:: Arc } ;
22
22
23
23
async fn prepare (
24
24
conn : & mut PgConnection ,
@@ -393,8 +393,7 @@ impl<'c> Executor<'c> for &'c mut PgConnection {
393
393
394
394
Box :: pin ( try_stream ! {
395
395
let arguments = arguments?;
396
- let s = self . run( sql, arguments, 0 , persistent, metadata) . await ?;
397
- pin_mut!( s) ;
396
+ let mut s = pin!( self . run( sql, arguments, 0 , persistent, metadata) . await ?) ;
398
397
399
398
while let Some ( v) = s. try_next( ) . await ? {
400
399
r#yield!( v) ;
@@ -420,8 +419,7 @@ impl<'c> Executor<'c> for &'c mut PgConnection {
420
419
421
420
Box :: pin ( async move {
422
421
let arguments = arguments?;
423
- let s = self . run ( sql, arguments, 1 , persistent, metadata) . await ?;
424
- pin_mut ! ( s) ;
422
+ let mut s = pin ! ( self . run( sql, arguments, 1 , persistent, metadata) . await ?) ;
425
423
426
424
// With deferred constraints we need to check all responses as we
427
425
// could get a OK response (with uncommitted data), only to get an
0 commit comments