fix: impl error for r2d2_postgres
This commit is contained in:
parent
944715d610
commit
b3d94d9c93
3 changed files with 9 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -493,7 +493,7 @@ checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
|
|||
|
||||
[[package]]
|
||||
name = "ood_persistence"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bb8",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "ood_persistence"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2018"
|
||||
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
|
||||
repository = "https://github.com/pleshevskiy/ood_persistence"
|
||||
|
|
|
@ -34,3 +34,10 @@ impl From<bb8_postgres::tokio_postgres::Error> for PersistenceError {
|
|||
Self::DbError(Box::new(err))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "r2d2_postgres", not(feature = "bb8_postgres")))]
|
||||
impl From<r2d2_postgres::postgres::Error> for PersistenceError {
|
||||
fn from(err: r2d2_postgres::postgres::Error) -> Self {
|
||||
Self::DbError(Box::new(err))
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue