Skip to content

Commit

Permalink
Avoid cloning components when rendering feed
Browse files Browse the repository at this point in the history
  • Loading branch information
Keats committed May 2, 2022
1 parent a297b11 commit df9061b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/site/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>(),
Expand Down

0 comments on commit df9061b

Please sign in to comment.