diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 97743f7..0e3d95d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,7 +27,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest, macos-10.15 ] + os: [ ubuntu-latest, macos-12 ] steps: # actions/checkout@v2 - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 diff --git a/src/connection_manager.rs b/src/connection_manager.rs index 6176892..07fafb9 100644 --- a/src/connection_manager.rs +++ b/src/connection_manager.rs @@ -80,7 +80,7 @@ where self.run_blocking(|m| m.connect()) .await .map(Connection::new) - .map_err(ConnectionError::Checkout) + .map_err(ConnectionError::Connection) } async fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error> { diff --git a/src/error.rs b/src/error.rs index df65501..47b51c5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -15,8 +15,8 @@ pub type ConnectionResult = Result; /// Errors returned directly from Connection. #[derive(Error, Debug)] pub enum ConnectionError { - #[error("Failed to checkout a connection: {0}")] - Checkout(#[from] diesel::r2d2::Error), + #[error("Connection error: {0}")] + Connection(#[from] diesel::r2d2::Error), #[error("Failed to issue a query: {0}")] Query(#[from] DieselError),