re-use header parser state when parsing the rest of the file

This commit is contained in:
Folkert 2021-03-02 22:51:51 +01:00
parent 84d036bd91
commit 24fcafa1c4
2 changed files with 8 additions and 7 deletions

View file

@ -40,7 +40,7 @@ pub fn gen_from_mono_module(
if let Some((_, header_src)) = loaded.header_sources.get(&home) {
src_lines.extend(header_src.split('\n'));
src_lines.extend(src.split('\n').skip(1));
src_lines.extend(src.split('\n'));
} else {
src_lines.extend(src.split('\n'));
}