diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 193fb6c..3619953 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -227,11 +227,11 @@ jobs: - name: Check formating run: cargo +stable fmt --all -- --check minimal_rust_version: - name: Check Minimal supported rust version (1.65.0) + name: Check Minimal supported rust version (1.78.0) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.65.0 + - uses: dtolnay/rust-toolchain@1.78.0 - uses: dtolnay/rust-toolchain@nightly - uses: taiki-e/install-action@cargo-hack - uses: taiki-e/install-action@cargo-minimal-versions @@ -240,4 +240,4 @@ jobs: # has broken min-version dependencies # cannot test sqlite yet as that crate # as broken min-version dependencies as well - run: cargo +stable minimal-versions check -p diesel-async --features "postgres bb8 deadpool mobc" + run: cargo +1.78.0 minimal-versions check -p diesel-async --features "postgres bb8 deadpool mobc" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9beb475..85a7e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/ * Added type `diesel_async::pooled_connection::mobc::PooledConnection` * MySQL/MariaDB now use `CLIENT_FOUND_ROWS` capability to allow consistent behavior with PostgreSQL regarding return value of UPDATe commands. +* The minimal supported rust version is now 1.78.0 ## [0.4.1] - 2023-09-01 diff --git a/Cargo.toml b/Cargo.toml index 22a4a7d..4cba665 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/weiznich/diesel_async" keywords = ["orm", "database", "sql", "async"] categories = ["database"] description = "An async extension for Diesel the safe, extensible ORM and Query Builder" -rust-version = "1.65.0" +rust-version = "1.78.0" [dependencies] diesel = { version = "~2.1.1", default-features = false, features = ["i-implement-a-third-party-backend-and-opt-into-breaking-changes"]} @@ -63,4 +63,4 @@ members = [ ] [patch.crates-io] -diesel = { git = "http://github.com/diesel-rs/diesel", rev = "793de72" } +diesel = { git = "http://github.com/diesel-rs/diesel", "rev" = "f2eb9b2"} diff --git a/src/sync_connection_wrapper.rs b/src/sync_connection_wrapper.rs index ba40086..67c2f54 100644 --- a/src/sync_connection_wrapper.rs +++ b/src/sync_connection_wrapper.rs @@ -125,8 +125,11 @@ where { self.execute_with_prepared_query(source.as_query(), |conn, query| { use diesel::row::IntoOwnedRow; + let mut cache = <<::Row<'_, '_> as IntoOwnedRow< + ::Backend, + >>::Cache as Default>::default(); conn.load(&query).map(|c| { - c.map(|row| row.map(IntoOwnedRow::into_owned)) + c.map(|row| row.map(|r| IntoOwnedRow::into_owned(r, &mut cache))) .collect::>>() }) })