Instead of having [TOC] in the source, put that in when we concat

This commit is contained in:
Carol (Nichols || Goulding) 2016-08-19 16:56:53 -04:00
parent 612f9bea87
commit 6b022d6972
2 changed files with 3 additions and 4 deletions

View File

@ -87,7 +87,9 @@ fn concat_files(source_paths: Vec<PathBuf>, target_path: PathBuf) -> io::Result<
let mut contents: Vec<u8> = Vec::new();
try!(source.read_to_end(&mut contents));
if !is_first {
if is_first {
try!(target.write_all(b"\n[TOC]\n\n"));
} else {
try!(target.write_all(b"\n"));
}
try!(target.write_all(&contents));

View File

@ -1,6 +1,3 @@
[TOC]
# Guessing Game
Let's jump into Rust with a hands-on project! This chapter will introduce you to