Verify that header sections are found even if not used
This prevents typos in the endif part of the section even when test
coverage is not perfect.
diff --git a/gen/write.rs b/gen/write.rs
index d80e957..4eed1b4 100644
--- a/gen/write.rs
+++ b/gen/write.rs
@@ -261,9 +261,10 @@
}
fn write_header_section(out: &mut OutFile, needed: bool, section: &str) {
+ let section = include::get(section);
if needed {
out.next_section();
- for line in include::get(section).lines() {
+ for line in section.lines() {
if !line.trim_start().starts_with("//") {
writeln!(out, "{}", line);
}