Avoid cloning components when rendering feed
This commit is contained in:
parent
a297b11f2a
commit
df9061b5a0
@ -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<_>>(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user