From d606e6d4885d27a728fb8c27d266f743d50bcef1 Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Tue, 29 Oct 2024 18:57:22 +0000 Subject: [PATCH] clippy --- src/content.rs | 2 +- src/site.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content.rs b/src/content.rs index f06316c..f30fbd0 100644 --- a/src/content.rs +++ b/src/content.rs @@ -35,7 +35,7 @@ pub fn get_title<'a>(frontmatter: &'a Frontmatter, html: &'a str) -> String { } } -pub fn get_description<'a>(frontmatter: &'a Frontmatter) -> Option { +pub fn get_description(frontmatter: &Frontmatter) -> Option { if let Some(description) = frontmatter.get("description") { return Some(description.to_string()); } diff --git a/src/site.rs b/src/site.rs index 630813d..7b2253f 100644 --- a/src/site.rs +++ b/src/site.rs @@ -588,7 +588,7 @@ fn handle_archive_pages( let year = date.year().to_string(); grouped_posts .entry(year) - .or_insert_with(Vec::new) + .or_default() .push(post); } } @@ -600,8 +600,8 @@ fn handle_archive_pages( &site_data .site .archives_content_title - .replace("$year", &year), - &contents, + .replace("$year", year), + contents, site_data, tera, output_dir,