use bb8;
use bb8_postgres;
use futures::future;
use futures::prelude::*;
use tokio_postgres;
use tokio_postgres::NoTls;
#[derive(Clone, Debug)]
pub struct Pool {
inner: bb8::Pool<bb8_postgres::PostgresConnectionManager<NoTls>>
}
impl From<bb8::Pool<bb8_postgres::PostgresConnectionManager<NoTls>>> for Pool {
fn from(v: bb8::Pool<bb8_postgres::PostgresConnectionManager<NoTls>>) -> Self {
Self { inner: v }
}
}
I am getting following error:
error: the trait bound `tokio_postgres::NoTls: bb8_postgres::tokio_postgres::tls::MakeTlsConnect<bb8_postgres::tokio_postgres::Socket>` is not satisfied
label: the trait `bb8_postgres::tokio_postgres::tls::MakeTlsConnect<bb8_postgres::tokio_postgres::Socket>` is not implemented for `tokio_postgres::NoTls`
You have a version mismatch going on. You need to use bb8 from master to be able to use tokio-postgres 0.5 (I hope to release a new version of bb8 soon).
I am getting following error: