Open
Description
I tried this code:
pub fn establish_connection(database_url: &str) -> Pool<PgConnection> {
let manager = ConnectionManager::<PgConnection>::new(database_url);
Pool::builder()
.build(manager)
.expect(&format!("Error connecting to {}", database_url))
}
And was expecting to get an error message something like:
Expected Pool<ConnectionManager<PgConnection>> got Pool<PgConnection>
Instead i got an misleading error:
the trait `diesel::r2d2::ManageConnection` is not implemented for `diesel::PgConnection`