From 4fcb90655180d6f5779488d44942b76260cdeaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=8B=D1=80=D1=86=D0=B5=D0=B2=20=D0=92=D0=B0=D0=B4?= =?UTF-8?q?=D0=B8=D0=BC=20=D0=98=D0=B3=D0=BE=D1=80=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 15 Jan 2024 19:28:56 +0300 Subject: [PATCH] Increase sqlx version --- crates/teloxide/Cargo.toml | 2 +- .../src/dispatching/dialogue/storage/sqlite_storage.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/teloxide/Cargo.toml b/crates/teloxide/Cargo.toml index 59c0fdb7..c6914358 100644 --- a/crates/teloxide/Cargo.toml +++ b/crates/teloxide/Cargo.toml @@ -99,7 +99,7 @@ serde_with_macros = "1.4" aquamarine = "0.1.11" either = "1.9.0" -sqlx = { version = "0.6", optional = true, default-features = false, features = [ +sqlx = { version = "0.7.3", optional = true, default-features = false, features = [ "macros", "sqlite", ] } diff --git a/crates/teloxide/src/dispatching/dialogue/storage/sqlite_storage.rs b/crates/teloxide/src/dispatching/dialogue/storage/sqlite_storage.rs index 00974be9..1268f0ab 100644 --- a/crates/teloxide/src/dispatching/dialogue/storage/sqlite_storage.rs +++ b/crates/teloxide/src/dispatching/dialogue/storage/sqlite_storage.rs @@ -40,7 +40,6 @@ impl SqliteStorage { serializer: S, ) -> Result, SqliteStorageError> { let pool = SqlitePool::connect(format!("sqlite:{path}?mode=rwc").as_str()).await?; - let mut conn = pool.acquire().await?; sqlx::query( " CREATE TABLE IF NOT EXISTS teloxide_dialogues ( @@ -49,7 +48,7 @@ CREATE TABLE IF NOT EXISTS teloxide_dialogues ( ); ", ) - .execute(&mut conn) + .execute(&pool) .await?; Ok(Arc::new(Self { pool, serializer }))