From df9061b5a0c35c6b1d283a74201eed48cc91571d Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 2 May 2022 23:01:57 +0200 Subject: [PATCH] Avoid cloning components when rendering feed --- components/site/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 9e8d1d3ad3..8287c0129c 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -969,8 +969,7 @@ impl Site { if let Some(base) = base_path { let mut components = Vec::new(); for component in base.components() { - // TODO: avoid cloning the paths - components.push(component.as_os_str().to_string_lossy().as_ref().to_string()); + components.push(component.as_os_str().to_string_lossy()); } self.write_content( &components.iter().map(|x| x.as_ref()).collect::>(),