Skip to content

Commit

Permalink
[Rust/Viz] viz v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Oct 3, 2024
1 parent 85ff491 commit 7bf20a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions frameworks/Rust/viz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ path = "src/main_diesel.rs"
required-features = ["diesel", "diesel-async", "sailfish"]

[dependencies]
viz = "0.8"
hyper = "1.0"
viz = "0.9"
hyper = "1.4"
hyper-util = "0.1"
atoi = "2.0"
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -36,7 +36,7 @@ futures-util = "0.3"

tokio = { version = "1", features = ["full"] }
tokio-postgres = { version = "0.7", optional = true }
sqlx = { version = "0.7", features = [
sqlx = { version = "0.8", features = [
"postgres",
"macros",
"runtime-tokio",
Expand All @@ -53,7 +53,7 @@ diesel-async = { git = "https://github.com/weiznich/diesel_async.git", rev = "74
yarte = { version = "0.15", features = ["bytes-buf", "json"], optional = true }
markup = { version = "0.15", optional = true }
v_htmlescape = { version = "0.15", optional = true }
sailfish = { version = "0.8", optional = true }
sailfish = { version = "0.9", optional = true }

[profile.release]
lto = true
Expand Down
6 changes: 3 additions & 3 deletions frameworks/Rust/viz/src/db_sqlx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub async fn get_world(
id: i32,
) -> Result<World, PgError> {
let mut args = PgArguments::default();
args.add(id);
args.add(id)?;

let world =
sqlx::query_as_with("SELECT id, randomnumber FROM World WHERE id = $1", args)
Expand All @@ -86,8 +86,8 @@ pub async fn update_worlds(

for w in &worlds {
let mut args = PgArguments::default();
args.add(w.randomnumber);
args.add(w.id);
args.add(w.randomnumber)?;
args.add(w.id)?;

sqlx::query_with("UPDATE World SET randomNumber = $1 WHERE id = $2", args)
.execute(&mut *conn)
Expand Down

0 comments on commit 7bf20a1

Please sign in to comment.