Remove redundant filtering operation (optimization)

This commit is contained in:
cmal 2018-08-09 11:55:27 +02:00
parent 77f8d96c9c
commit 739c2011a7

View file

@ -187,7 +187,6 @@ impl Site {
section_entries
.into_par_iter()
.filter(|entry| entry.as_path().file_name().unwrap() == "_index.md")
.map(|entry| {
let path = entry.as_path();
Section::from_file(path, config)
@ -200,7 +199,6 @@ impl Site {
page_entries
.into_par_iter()
.filter(|entry| entry.as_path().file_name().unwrap() != "_index.md")
.map(|entry| {
let path = entry.as_path();
Page::from_file(path, config)