jbr / async-sqlx-session

30 stars 27 forks source link

PgPool #20

Closed michaelkimchi closed 3 years ago

michaelkimchi commented 3 years ago

I am having a weird error.

mismatched types [E0308] expected `sqlx_core::postgres::PgPool`, found `Pool<Postgres>

For this

    let session_store = PostgresSessionStore::from_client(pool.clone());

Where pool: PgPool

I wonder if it is because I am using tokio while this one only support async-std?

https://github.com/jbr/async-sqlx-session/blob/main/Cargo.toml#L17-L27

michaelkimchi commented 3 years ago

Not sure why but it works when I reference to my local copy AND disable default features, something like this

async-sqlx-session = { path = "../../../rust/async-sqlx-session", version = "0.3.0", default-features = false, features= ["pg"] }

It wouldn't work if I use cargo version and disable default features

michaelkimchi commented 3 years ago

It works when I pointed to git so probably just because the version is un-released