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 }))