From 0295bf1ea4fe2227717f5db0f791ed25b8e57fb5 Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Mon, 21 Oct 2024 19:49:35 +0100 Subject: [PATCH] clippy --- src/markdown.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/markdown.rs b/src/markdown.rs index 62e31df..c786d8a 100644 --- a/src/markdown.rs +++ b/src/markdown.rs @@ -37,10 +37,7 @@ pub fn process_file(path: &Path, site_data: &mut Data) -> Result<(), String> { let slug = get_slug(&frontmatter, path); let date = get_date(&frontmatter, path); - let extra = match frontmatter.get("extra") { - Some(v) => Some(v.to_owned()), - _ => None, - }; + let extra = frontmatter.get("extra").map(std::borrow::ToOwned::to_owned); let content = Content { title,