From 5ab841820df3249346dceaeeb3b2085b4c6a2ee8 Mon Sep 17 00:00:00 2001 From: Prabir Shrestha Date: Mon, 10 Apr 2023 00:10:51 -0700 Subject: [PATCH] update build deps for ructe and bump version to v0.253.0 --- Cargo.lock | 39 +++++++-------------------------------- Cargo.toml | 4 ++-- src/routes/rss.rs | 2 +- src/server.rs | 2 +- 4 files changed, 11 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f661bf5..0291734 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1068,17 +1068,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nom_locate" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e299bf5ea7b212e811e71174c5d1a5d065c4c0ad0c8691ecb1f97e3e66025e" -dependencies = [ - "bytecount", - "memchr", - "nom", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -1117,6 +1106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", + "num-bigint", "num-integer", "num-traits", ] @@ -1353,7 +1343,7 @@ dependencies = [ [[package]] name = "rblog" -version = "0.252.0" +version = "0.253.0" dependencies = [ "anyhow", "async-fs", @@ -1364,8 +1354,7 @@ dependencies = [ "mime", "mime_guess", "pulldown-cmark", - "ructe 0.15.0", - "ructe 0.16.1", + "ructe", "salvo", "serde", "serde_yaml", @@ -1427,15 +1416,14 @@ dependencies = [ [[package]] name = "rsass" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "665387d3be91521de331a04cc7118c8c129ffe43c5f4e8a61e78990850046b5a" +checksum = "a43695dd28122f6c684273de89796a56a98e02e9694b8ab57b160fdc6e6d69af" dependencies = [ "arc-swap", "fastrand", "lazy_static", "nom", - "nom_locate", "num-bigint", "num-integer", "num-rational", @@ -1443,21 +1431,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "ructe" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85517cd381cf0c34694881d8aaf173107c6af7670e66cec18d7a1a8bfce3b758" -dependencies = [ - "base64 0.13.1", - "bytecount", - "itertools", - "md5", - "mime", - "nom", - "rsass", -] - [[package]] name = "ructe" version = "0.16.1" @@ -1468,7 +1441,9 @@ dependencies = [ "bytecount", "itertools", "md5", + "mime", "nom", + "rsass", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3392567..c30fd0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rblog" -version = "0.252.0" +version = "0.253.0" authors = ["Prabir Shrestha "] edition = "2021" license = "MIT" @@ -9,7 +9,7 @@ repository = "https://github.com/prabirshrestha/rblog" build = "src/build.rs" [build-dependencies] -ructe = { version = "0.15.0", features = ["sass", "mime03"] } +ructe = { version = "0.16.1", features = ["sass", "mime03"] } [dependencies] anyhow = "1.0.70" diff --git a/src/routes/rss.rs b/src/routes/rss.rs index 54f47f9..8dc307f 100644 --- a/src/routes/rss.rs +++ b/src/routes/rss.rs @@ -12,7 +12,7 @@ pub async fn rss_feed(depot: &mut Depot, res: &mut Response) -> Result<()> { .map(|key| state.get_blog().get_post(key).unwrap()) .collect(); - render_rss(res, |o| templates::rss(o, blog, posts))?; + render_rss(res, |o| templates::rss_html(o, blog, posts))?; Ok(()) } diff --git a/src/server.rs b/src/server.rs index cd025f9..10b04a8 100644 --- a/src/server.rs +++ b/src/server.rs @@ -55,7 +55,7 @@ struct NotFoundCatcher; impl Catcher for NotFoundCatcher { fn catch(&self, _req: &Request, _depot: &Depot, res: &mut Response) -> bool { if let Some(StatusCode::NOT_FOUND) = res.status_code() { - match render_html(res, |o| templates::notfound(o)) { + match render_html(res, |o| templates::notfound_html(o)) { Ok(_) => true, Err(_) => false, }