Remove condition that's always true (optimization)
@@ -84,7 +84,6 @@ impl Section {
let content = read_file(path)?;
let mut section = Section::parse(path, &content, config)?;
- if section.file.name == "_index" {
let parent_dir = path.parent().unwrap();
let assets = find_related_assets(parent_dir);
@@ -106,9 +105,6 @@ impl Section {
} else {
section.assets = assets;
}
- } else {
- section.assets = vec![];
- }
Ok(section)
}
