From c1a12a081b2d4c83b35b64b813d20d4db22fd13d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Wed, 20 Sep 2023 19:18:13 +0200 Subject: [PATCH] Update the sqlx dependency --- .github/workflows/ci.yml | 5 ----- Cargo.toml | 2 +- src/db.rs | 6 +++--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5751fbd..2792588 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,6 @@ jobs: strategy: matrix: rust: - - 1.65.0 - - 1.66.1 - - 1.67.1 - - 1.68.1 - - 1.69.0 - 1.70.0 - 1.71.1 - 1.72.1 diff --git a/Cargo.toml b/Cargo.toml index c75dc3a..fe8afd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,6 @@ nom = { version = "7.1.3", default-features = false } rand = { version = "0.8.5", default-features = false } rsa = { version = "0.9.0", default-features = false, features = ["sha2", "std"] } sha2 = { version = "0.10.6", default-features = false, features = ["asm"] } -sqlx = { version = "0.6.3", default-features = false, features = ["runtime-tokio-native-tls", "macros", "migrate", "sqlite", "time"] } +sqlx = { version = "0.7.1", default-features = false, features = ["runtime-tokio-native-tls", "macros", "migrate", "sqlite", "time"] } tokio = { version = "1.27.0", default-features = false, features = ["rt-multi-thread", "io-std", "io-util", "macros", "sync", "time", "process"] } uuid = { version = "1.3.1", default-features = false, features = ["v4", "fast-rng"] } diff --git a/src/db.rs b/src/db.rs index 661d08b..7e111ac 100644 --- a/src/db.rs +++ b/src/db.rs @@ -59,10 +59,10 @@ WHERE AND algorithm = $3"; pub async fn init(cnf: &Config) -> Result { - let mut db_options = SqliteConnectOptions::new() + let db_options = SqliteConnectOptions::new() .filename(cnf.key_data_base()) - .create_if_missing(true); - db_options.log_statements(log::LevelFilter::Trace); + .create_if_missing(true) + .log_statements(log::LevelFilter::Trace); let db_pool = SqlitePoolOptions::new().connect_with(db_options).await?; sqlx::migrate!().run(&db_pool).await?; Ok(db_pool)