mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
Make Pool generic over Backend
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#![feature(async_await)]
|
||||
|
||||
use futures::future;
|
||||
use failure::Fallible;
|
||||
use fake::{
|
||||
faker::{
|
||||
@@ -10,7 +9,8 @@ use fake::{
|
||||
},
|
||||
Dummy, Fake, Faker,
|
||||
};
|
||||
use sqlx::pool::Pool;
|
||||
use futures::future;
|
||||
use sqlx::{pool::Pool, postgres::Postgres};
|
||||
|
||||
#[derive(Debug, Dummy)]
|
||||
struct Contact {
|
||||
@@ -40,7 +40,7 @@ async fn main() -> Fallible<()> {
|
||||
.user("postgres")
|
||||
.database("sqlx__dev__contacts");
|
||||
|
||||
let pool = Pool::new(options);
|
||||
let pool = Pool::<Postgres>::new(options);
|
||||
|
||||
{
|
||||
let mut conn = pool.acquire().await?;
|
||||
|
||||
Reference in New Issue
Block a user