standard_error/extras/fromerrs/database/
r2d2_postgres.rs

1#[cfg(feature = "diesel")]
2use crate::{Interpolate, StandardError};
3#[cfg(feature = "diesel")]
4use r2d2_postgres::r2d2::Error;
5
6#[cfg(feature = "diesel")]
7impl From<Error> for StandardError {
8    fn from(error: Error) -> Self {
9        StandardError::new("ER-DB-POOL").interpolate_err(error.to_string())
10    }
11}