Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust/Viz] viz v0.9.0 #9307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions frameworks/Rust/viz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,28 @@ 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"] }
nanorand = "0.7"
rand = { version = "0.8", features = ["small_rng"] }
thiserror = "1.0"
futures-util = "0.3"

[target.'cfg(not(unix))'.dependencies]
nanorand = { version = "0.7" }

[target.'cfg(unix)'.dependencies]
nanorand = { version = "0.7", features = ["getrandom"] }

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",
"tls-native-tls"
"tls-native-tls",
], optional = true }
diesel = { version = "2.2", default-features = false, features = [
"i-implement-a-third-party-backend-and-opt-into-breaking-changes",
Expand All @@ -53,7 +58,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);
let _ = 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);
let _ = args.add(w.randomnumber);
let _ = args.add(w.id);

sqlx::query_with("UPDATE World SET randomNumber = $1 WHERE id = $2", args)
.execute(&mut *conn)
Expand Down
4 changes: 2 additions & 2 deletions frameworks/Rust/viz/templates/fortune.stpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<body>
<table>
<tr><th>id</th><th>message</th></tr>
<% for item in items { %><tr><td><%= item.id %></td><td><%= &*item.message %></td></tr><% } %>
<% for item in self.items { %><tr><td><%= item.id %></td><td><%= &*item.message %></td></tr><% } %>
</table>
</body>
</html>
</html>
Loading