mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-25 00:18:46 +08:00
Instead of having [TOC] in the source, put that in when we concat
This commit is contained in:
parent
612f9bea87
commit
6b022d6972
@ -87,7 +87,9 @@ fn concat_files(source_paths: Vec<PathBuf>, target_path: PathBuf) -> io::Result<
|
|||||||
let mut contents: Vec<u8> = Vec::new();
|
let mut contents: Vec<u8> = Vec::new();
|
||||||
try!(source.read_to_end(&mut contents));
|
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(b"\n"));
|
||||||
}
|
}
|
||||||
try!(target.write_all(&contents));
|
try!(target.write_all(&contents));
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
[TOC]
|
|
||||||
|
|
||||||
# Guessing Game
|
# Guessing Game
|
||||||
|
|
||||||
Let's jump into Rust with a hands-on project! This chapter will introduce you to
|
Let's jump into Rust with a hands-on project! This chapter will introduce you to
|
||||||
|
Loading…
Reference in New Issue
Block a user