diff --git a/diesel/Cargo.toml b/diesel/Cargo.toml index 3b81e339ac0b..e754f195a8ae 100644 --- a/diesel/Cargo.toml +++ b/diesel/Cargo.toml @@ -16,7 +16,7 @@ rust-version = "1.66.0" byteorder = { version = "1.0", optional = true } chrono = { version = "0.4.20", optional = true, default-features = false, features = ["clock", "std"] } libc = { version = "0.2.0", optional = true } -libsqlite3-sys = { version = ">=0.17.2, <0.27.0", optional = true, features = ["bundled_bindings"] } +libsqlite3-sys = { version = ">=0.17.2, <0.28.0", optional = true, features = ["bundled_bindings"] } mysqlclient-sys = { version = "0.2.5", optional = true } pq-sys = { version = "0.4.0", optional = true } quickcheck = { version = "1.0.3", optional = true } diff --git a/diesel/src/sqlite/connection/raw.rs b/diesel/src/sqlite/connection/raw.rs index 047736b35632..9f31a58106a4 100644 --- a/diesel/src/sqlite/connection/raw.rs +++ b/diesel/src/sqlite/connection/raw.rs @@ -200,6 +200,8 @@ impl RawConnection { } pub(super) fn deserialize(&mut self, data: &[u8]) -> QueryResult<()> { + // the cast for `ffi::SQLITE_DESERIALIZE_READONLY` is required for old libsqlite3-sys versions + #[allow(clippy::unnecessary_cast)] unsafe { let result = ffi::sqlite3_deserialize( self.internal_connection.as_ptr(), diff --git a/diesel/src/sqlite/connection/stmt.rs b/diesel/src/sqlite/connection/stmt.rs index c580bb3e4aaf..a5ba556690c1 100644 --- a/diesel/src/sqlite/connection/stmt.rs +++ b/diesel/src/sqlite/connection/stmt.rs @@ -26,6 +26,8 @@ impl Statement { ) -> QueryResult { let mut stmt = ptr::null_mut(); let mut unused_portion = ptr::null(); + // the cast for `ffi::SQLITE_PREPARE_PERSISTENT` is required for old libsqlite3-sys versions + #[allow(clippy::unnecessary_cast)] let prepare_result = unsafe { ffi::sqlite3_prepare_v3( raw_connection.internal_connection.as_ptr(), diff --git a/diesel_cli/Cargo.toml b/diesel_cli/Cargo.toml index 1a2eeb75ff67..c72b7a352d5a 100644 --- a/diesel_cli/Cargo.toml +++ b/diesel_cli/Cargo.toml @@ -31,7 +31,7 @@ heck = "0.4.0" serde = { version = "1.0.0", features = ["derive"] } toml = "0.8" url = { version = "2.2.2" } -libsqlite3-sys = { version = ">=0.17.2, <0.27.0", optional = true } +libsqlite3-sys = { version = ">=0.17.2, <0.28.0", optional = true } diffy = "0.3.0" regex = "1.0.6" serde_regex = "1.1" diff --git a/diesel_tests/Cargo.toml b/diesel_tests/Cargo.toml index e2340c979037..5fdd4a5f35dd 100644 --- a/diesel_tests/Cargo.toml +++ b/diesel_tests/Cargo.toml @@ -21,7 +21,7 @@ ipnet = { version = "2.5.0" } ipnetwork = ">=0.12.2, <0.21.0" bigdecimal = ">= 0.0.13, < 0.5.0" rand = "0.8.4" -libsqlite3-sys = { version = "0.26", optional = true } +libsqlite3-sys = { version = "0.27", optional = true } [features] default = [] diff --git a/examples/sqlite/all_about_inserts/Cargo.toml b/examples/sqlite/all_about_inserts/Cargo.toml index f8d2b8ad1397..80f6e615d21a 100644 --- a/examples/sqlite/all_about_inserts/Cargo.toml +++ b/examples/sqlite/all_about_inserts/Cargo.toml @@ -9,7 +9,7 @@ diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "c serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.68" chrono = { version = "0.4.20", default-features = false, features = ["clock", "std"] } -libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } +libsqlite3-sys = { version = "0.27.0", features = ["bundled"] } [lib] doc = false diff --git a/examples/sqlite/getting_started_step_1/Cargo.toml b/examples/sqlite/getting_started_step_1/Cargo.toml index 356b2c1d20c5..a53a790cfa1c 100644 --- a/examples/sqlite/getting_started_step_1/Cargo.toml +++ b/examples/sqlite/getting_started_step_1/Cargo.toml @@ -9,7 +9,7 @@ publish = false [dependencies] diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite"] } dotenvy = "0.15" -libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } +libsqlite3-sys = { version = "0.27.0", features = ["bundled"] } [[bin]] name = "show_posts" diff --git a/examples/sqlite/getting_started_step_2/Cargo.toml b/examples/sqlite/getting_started_step_2/Cargo.toml index 22f301218625..ad212b010c17 100644 --- a/examples/sqlite/getting_started_step_2/Cargo.toml +++ b/examples/sqlite/getting_started_step_2/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } dotenvy = "0.15" -libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } +libsqlite3-sys = { version = "0.27.0", features = ["bundled"] } [[bin]] name = "show_posts" diff --git a/examples/sqlite/getting_started_step_3/Cargo.toml b/examples/sqlite/getting_started_step_3/Cargo.toml index 9752dfaf17d0..1c975637442c 100644 --- a/examples/sqlite/getting_started_step_3/Cargo.toml +++ b/examples/sqlite/getting_started_step_3/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] } dotenvy = "0.15" -libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] } +libsqlite3-sys = { version = "0.27.0", features = ["bundled"] } [[bin]] name = "show_posts"