Refactor to prevent excessive indentation.
This commit is contained in:
parent
c6e81337fb
commit
15dcca87d8
|
@ -180,10 +180,11 @@ impl MDBook {
|
||||||
debug!("[*]: constructing paths for missing files");
|
debug!("[*]: constructing paths for missing files");
|
||||||
for item in self.iter() {
|
for item in self.iter() {
|
||||||
debug!("[*]: item: {:?}", item);
|
debug!("[*]: item: {:?}", item);
|
||||||
match *item {
|
let ch = match *item {
|
||||||
BookItem::Spacer => continue,
|
BookItem::Spacer => continue,
|
||||||
BookItem::Chapter(_, ref ch) |
|
BookItem::Chapter(_, ref ch) |
|
||||||
BookItem::Affix(ref ch) => {
|
BookItem::Affix(ref ch) => ch,
|
||||||
|
};
|
||||||
if ch.path != PathBuf::new() {
|
if ch.path != PathBuf::new() {
|
||||||
let path = self.src.join(&ch.path);
|
let path = self.src.join(&ch.path);
|
||||||
|
|
||||||
|
@ -199,8 +200,6 @@ impl MDBook {
|
||||||
try!(writeln!(f, "# {}", ch.name));
|
try!(writeln!(f, "# {}", ch.name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
debug!("[*]: init done");
|
debug!("[*]: init done");
|
||||||
|
|
Loading…
Reference in New Issue