Skip to content

Commit 902efb7

Browse files
authored
[xitca-web] bug fix (#9243)
* [xitca-web] bug fix * dep update. * template fix
1 parent a05b90e commit 902efb7

File tree

4 files changed

+41
-41
lines changed

4 files changed

+41
-41
lines changed

frameworks/Rust/xitca-web/Cargo.lock

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/Rust/xitca-web/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ required-features = ["pg-orm", "template", "web-codegen"]
3030

3131
[features]
3232
# pg optional
33-
pg = ["xitca-postgres/single-thread"]
33+
pg = ["dep:xitca-postgres"]
3434
# pg send/sync optional
35-
pg-sync = ["xitca-postgres"]
35+
pg-sync = ["dep:xitca-postgres"]
3636
# pg orm optional
37-
pg-orm = ["diesel"]
37+
pg-orm = ["dep:diesel"]
3838
# http router optional
3939
router = ["xitca-http/router"]
4040
# web optional
41-
web = ["xitca-web"]
41+
web = ["dep:xitca-web"]
4242
# web codegen optional
4343
web-codegen = ["xitca-web/codegen", "xitca-web/urlencoded"]
4444
# template optional
45-
template = ["sailfish"]
45+
template = ["dep:sailfish"]
4646
# io-uring optional
4747
io-uring = ["xitca-http/io-uring", "xitca-server/io-uring"]
4848
# axum optional
49-
axum = ["dep:axum", "http-body", "tower", "tower-http", "xitca-web/tower-http-compat" ]
49+
axum = ["dep:axum", "dep:http-body", "dep:tower", "dep:tower-http", "xitca-web/tower-http-compat" ]
5050
# unrealistic performance optimization
51-
perf = ["mimalloc", "tokio/parking_lot"]
51+
perf = ["dep:mimalloc", "tokio/parking_lot"]
5252

5353
[dependencies]
5454
xitca-http = "0.6"
@@ -71,7 +71,7 @@ xitca-postgres = { version = "0.1", optional = true }
7171
diesel = { version = "2", features = ["postgres", "r2d2"], optional = true }
7272

7373
# template optional
74-
sailfish = { version = "0.8", default-features = false, features = ["derive", "perf-inline"], optional = true }
74+
sailfish = { version = "0.9", default-features = false, features = ["derive", "perf-inline"], optional = true }
7575

7676
# axum optional
7777
axum = { version = "0.7", optional = true, default-features = false, features = ["json", "query"] }
@@ -95,5 +95,5 @@ codegen-units = 1
9595
panic = "abort"
9696

9797
[patch.crates-io]
98-
xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "f4e7bed" }
98+
xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "6870448" }
9999
mio = { git = "https://github.com/fakeshadow/mio", rev = "9bae6012b7ecfc6083350785f71a5e8265358178" }

frameworks/Rust/xitca-web/src/db.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Client {
100100
let mut res = {
101101
let (ref mut rng, ref mut buf) = *self.shared();
102102

103-
let mut pipe = Pipeline::<_, false>::with_capacity_from_buf(len, buf);
103+
let mut pipe = Pipeline::with_capacity_from_buf(len, buf);
104104

105105
(0..num).try_for_each(|_| pipe.query_raw(&self.world, [rng.gen_id()]))?;
106106

@@ -128,7 +128,7 @@ impl Client {
128128
let mut res = {
129129
let (ref mut rng, ref mut buf) = *self.shared();
130130

131-
let mut pipe = Pipeline::<_, false>::with_capacity_from_buf(len + 1, buf);
131+
let mut pipe = Pipeline::with_capacity_from_buf(len + 1, buf);
132132

133133
(0..num).try_for_each(|_| {
134134
let w_id = rng.gen_id();

frameworks/Rust/xitca-web/templates/fortune.stpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<body>
55
<table>
66
<tr><th>id</th><th>message</th></tr>
7-
<% for item in items { %><tr><td><%= item.id %></td><td><%= &*item.message %></td></tr><% } %>
7+
<% for item in self.items { %><tr><td><%= item.id %></td><td><%= &*item.message %></td></tr><% } %>
88
</table>
99
</body>
1010
</html>

0 commit comments

Comments
 (0)