parent
6ab65f4247
commit
f1ad6f3bd3
|
@ -207,6 +207,7 @@ dependencies = [
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
"tera",
|
"tera",
|
||||||
|
"v_htmlescape",
|
||||||
"yarte",
|
"yarte",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ serde_derive = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
serde_yaml = "0.8"
|
serde_yaml = "0.8"
|
||||||
tera = { git = "https://github.com/Keats/tera" }
|
tera = { git = "https://github.com/Keats/tera" }
|
||||||
|
v_htmlescape = "0.9.1"
|
||||||
yarte = { git = "https://github.com/botika/yarte", features = ["bytes-buf", "fixed"] }
|
yarte = { git = "https://github.com/botika/yarte", features = ["bytes-buf", "fixed"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
use v_htmlescape::escape;
|
||||||
|
|
||||||
use criterion;
|
use criterion;
|
||||||
|
|
||||||
|
@ -68,8 +69,8 @@ pub fn teams(b: &mut criterion::Bencher<'_>, _: &usize) {
|
||||||
&mut output,
|
&mut output,
|
||||||
"<li class=\"{champion}\">
|
"<li class=\"{champion}\">
|
||||||
<b>{name}</b>: {score}",
|
<b>{name}</b>: {score}",
|
||||||
champion = champion,
|
champion = escape(champion),
|
||||||
name = team.name,
|
name = escape(&team.name),
|
||||||
score = team.score
|
score = team.score
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
Loading…
Reference in New Issue