From b4472b41214eeeacce071df41bf0f782e1f16d6d Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Thu, 9 Jun 2022 20:10:19 +0200 Subject: feat: Move from pico to custom css Use css from my current blog, which is a lot smaller. The text itself looks good but the code still breaks the page. Metrics: - hyper: 16.37 KB / 16.47 KB transferred - 1 request --- src/router.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/router.rs') diff --git a/src/router.rs b/src/router.rs index 0bba091..35fdf3e 100644 --- a/src/router.rs +++ b/src/router.rs @@ -1,4 +1,4 @@ -use regex::{Regex}; +use regex::Regex; const ACTION_REGEX: &str = r"/{0,1}(?P\w*)/(?P.+)"; @@ -14,14 +14,15 @@ impl Router { let caps = re.captures(path); let action = match caps { Some(ref value) => &value["action"], - None => "index" + None => "index", }; match action { - "posts" => Router::Post { page: caps.unwrap()["id"].to_string() }, + "posts" => Router::Post { + page: caps.unwrap()["id"].to_string(), + }, "index" => Router::Index, - _ => Router::NotFound + _ => Router::NotFound, } } } - -- cgit v1.2.3