Upgrade all crates

This commit is contained in:
Charlotte Som 2023-11-16 01:46:52 +00:00
parent 45efb19da7
commit 882acbf147
3 changed files with 767 additions and 552 deletions

1305
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -6,8 +6,8 @@ edition = "2021"
[dependencies]
dotenv = "0.15.0"
rand = "0.8.5"
serde = { version = "1.0.164", features = ["derive"] }
serde_json = "1.0.99"
sqlx = { version = "0.6.3", features = ["sqlite", "runtime-tokio-rustls"] }
tokio = { version = "1.29.1", features = ["full"] }
warp = "0.3.5"
serde = { version = "1.0.192", features = ["derive"] }
serde_json = "1.0.108"
sqlx = { version = "0.7.2", features = ["sqlite", "runtime-tokio-rustls"] }
tokio = { version = "1.34.0", features = ["full"] }
warp = "0.3.6"

View file

@ -159,7 +159,7 @@ async fn list_redirects(db: SqlitePool, authorization: String) -> Result<impl Re
async fn get_redirects(db: SqlitePool) -> sqlx::Result<Vec<Redirect>> {
let mut conn = db.acquire().await?;
let query = sqlx::query_as!(Redirect, "SELECT * FROM redirects");
query.fetch_all(&mut conn).await
query.fetch_all(&mut *conn).await
}
match get_redirects(db).await {
@ -172,7 +172,7 @@ async fn lookup_redirect(path: String, db: SqlitePool) -> Result<impl Reply, Rej
async fn find_redirect(db: SqlitePool, path: &str) -> sqlx::Result<Redirect> {
let mut conn = db.acquire().await?;
let query = sqlx::query_as!(Redirect, "SELECT * FROM redirects WHERE path = ?", path);
query.fetch_one(&mut conn).await
query.fetch_one(&mut *conn).await
}
match find_redirect(db, &path).await {