Skip to content

Commit 14badaf

Browse files
GuillaumeGomezsyphar
authored andcommitted
Use tuple instead of array of size 1 for template runtime value
1 parent ece8219 commit 14badaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/web/page/web_page.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ macro_rules! impl_axum_webpage {
2626
) => {
2727
impl $crate::web::page::web_page::AddCspNonce for $page {
2828
fn render_with_csp_nonce(&mut self, csp_nonce: String) -> askama::Result<String> {
29-
let values: [(&str, &dyn std::any::Any); 1] = [("csp_nonce", &csp_nonce)];
29+
let values: (&str, &dyn std::any::Any) = ("csp_nonce", &csp_nonce);
3030
self.render_with_values(&values)
3131
}
3232
}

0 commit comments

Comments
 (0)