Skip to content

Commit 85b2059

Browse files
committed
update to minimal diff
1 parent dcd5c51 commit 85b2059

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ use diesel::{ConnectionResult, QueryResult};
7373
use futures::{Future, Stream};
7474

7575
pub use scoped_futures;
76-
use scoped_futures::*;
76+
use scoped_futures::ScopedBoxFuture;
7777

7878
#[cfg(feature = "mysql")]
7979
mod mysql;

src/pg/transaction_builder.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ where
7777
/// assert!(write_attempt.is_err());
7878
///
7979
/// Ok(())
80-
/// }).into()).await?;
80+
/// }) as _).await?;
8181
/// # sql_query("DROP TABLE users_for_read_only").execute(conn).await?;
8282
/// # Ok(())
8383
/// # }
@@ -127,7 +127,7 @@ where
127127
/// # /*
128128
/// Ok(())
129129
/// # */
130-
/// }).into())
130+
/// }) as _)
131131
/// .await
132132
/// # }
133133
/// ```
@@ -153,7 +153,7 @@ where
153153
/// # let conn = &mut connection_no_transaction().await;
154154
/// conn.build_transaction()
155155
/// .deferrable()
156-
/// .run(|conn| Box::pin(async { Ok(()) }).into())
156+
/// .run(|conn| Box::pin(async { Ok(()) }))
157157
/// .await
158158
/// # }
159159
/// ```
@@ -182,7 +182,7 @@ where
182182
/// # let conn = &mut connection_no_transaction().await;
183183
/// conn.build_transaction()
184184
/// .not_deferrable()
185-
/// .run(|conn| Box::pin(async { Ok(()) }).into())
185+
/// .run(|conn| Box::pin(async { Ok(()) }) as _)
186186
/// .await
187187
/// # }
188188
/// ```
@@ -211,7 +211,7 @@ where
211211
/// # let conn = &mut connection_no_transaction().await;
212212
/// conn.build_transaction()
213213
/// .read_committed()
214-
/// .run(|conn| Box::pin(async { Ok(()) }).into())
214+
/// .run(|conn| Box::pin(async { Ok(()) }) as _)
215215
/// .await
216216
/// # }
217217
/// ```
@@ -237,7 +237,7 @@ where
237237
/// # let conn = &mut connection_no_transaction().await;
238238
/// conn.build_transaction()
239239
/// .repeatable_read()
240-
/// .run(|conn| Box::pin(async { Ok(()) }).into())
240+
/// .run(|conn| Box::pin(async { Ok(()) }) as _)
241241
/// .await
242242
/// # }
243243
/// ```
@@ -263,7 +263,7 @@ where
263263
/// # let conn = &mut connection_no_transaction().await;
264264
/// conn.build_transaction()
265265
/// .serializable()
266-
/// .run(|conn| Box::pin(async { Ok(()) }).into())
266+
/// .run(|conn| Box::pin(async { Ok(()) }) as _)
267267
/// .await
268268
/// # }
269269
/// ```

tests/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
use diesel::prelude::{ExpressionMethods, OptionalExtension, QueryDsl};
22
use diesel::QueryResult;
33
use diesel_async::*;
4-
use futures::FutureExt;
4+
use scoped_futures::ScopedFutureExt;
55
use std::fmt::Debug;
6+
use std::pin::Pin;
67

78
#[cfg(feature = "postgres")]
89
mod custom_types;
@@ -30,7 +31,7 @@ async fn transaction_test(conn: &mut TestConnection) -> QueryResult<()> {
3031
assert_eq!(count, 3);
3132
Ok(())
3233
}
33-
.boxed().into()
34+
.scope_boxed()
3435
})
3536
.await;
3637
assert!(res.is_ok());
@@ -47,7 +48,7 @@ async fn transaction_test(conn: &mut TestConnection) -> QueryResult<()> {
4748
assert_eq!(count, 4);
4849

4950
Err(diesel::result::Error::RollbackTransaction)
50-
}).into()
51+
}) as Pin<Box<_>>
5152
})
5253
.await;
5354
assert_eq!(

0 commit comments

Comments
 (0)