From c2732fe85cb5e98ac870db68069ee7c8e0091544 Mon Sep 17 00:00:00 2001 From: Triston Date: Mon, 25 Mar 2024 23:52:32 -0500 Subject: [PATCH] make tuts list a str vec --- src/routes.rs | 4 +++- src/templates.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/routes.rs b/src/routes.rs index 00f01e4..dcf85b6 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -21,8 +21,10 @@ pub async fn notes() -> impl IntoResponse { } pub async fn tuts() -> impl IntoResponse { + let tuts_list = Vec::new(); + templates::Tuts { - tuts_list: "some tuts", + tuts_list: tuts_list, } } diff --git a/src/templates.rs b/src/templates.rs index 71c6975..3c442bd 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -11,7 +11,7 @@ pub struct Notes; #[derive(Template)] #[template(path = "tuts.html")] pub struct Tuts<'a> { - pub tuts_list: &'a str, + pub tuts_list: Vec<&'a str>, } #[derive(Template)]