Remove condition that's always true (optimization)
This commit is contained in:
parent
739c2011a7
commit
31479ff23b
|
@ -84,7 +84,6 @@ impl Section {
|
||||||
let content = read_file(path)?;
|
let content = read_file(path)?;
|
||||||
let mut section = Section::parse(path, &content, config)?;
|
let mut section = Section::parse(path, &content, config)?;
|
||||||
|
|
||||||
if section.file.name == "_index" {
|
|
||||||
let parent_dir = path.parent().unwrap();
|
let parent_dir = path.parent().unwrap();
|
||||||
let assets = find_related_assets(parent_dir);
|
let assets = find_related_assets(parent_dir);
|
||||||
|
|
||||||
|
@ -106,9 +105,6 @@ impl Section {
|
||||||
} else {
|
} else {
|
||||||
section.assets = assets;
|
section.assets = assets;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
section.assets = vec![];
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(section)
|
Ok(section)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue