Remove condition that's always true (optimization)

This commit is contained in:
cmal 2018-08-09 11:58:09 +02:00
parent 739c2011a7
commit 31479ff23b

View file

@ -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)
}