Skip to content

Commit

Permalink
Merge pull request #11 from attilarepka/dependabot/cargo/clap-4.5.21
Browse files Browse the repository at this point in the history
chore(deps): bump clap from 4.5.4 to 4.5.21
  • Loading branch information
attilarepka authored Nov 26, 2024
2 parents 0144843 + 4f0be99 commit fd83c8e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ revision = ""

[dependencies]
anyhow = "1.0.93"
clap = { version = "4.5.4", features = ["derive"] }
clap = { version = "4.5.21", features = ["derive"] }
crossterm = "0.28.1"
futures = "0.3.31"
hex = "0.4.3"
Expand Down
8 changes: 6 additions & 2 deletions src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use anyhow::Result;
use serde_json::{json, Value};
use sqlx::{
sqlite::{SqliteConnectOptions, SqliteRow},
sqlite::{SqliteConnectOptions, SqlitePoolOptions, SqliteRow},
Column, QueryBuilder, Row, SqlitePool, TypeInfo,
};

Expand All @@ -14,8 +14,12 @@ pub struct Sqlite {

impl Sqlite {
pub async fn new() -> Result<Sqlite> {
let sqlite_opts = SqliteConnectOptions::new().in_memory(true);
Ok(Sqlite {
pool: SqlitePool::connect(":memory:").await?,
pool: SqlitePoolOptions::new()
.max_connections(1)
.connect_with(sqlite_opts)
.await?,
})
}

Expand Down

0 comments on commit fd83c8e

Please sign in to comment.