Fix unreachable code warning in parse::summary::parse_level

This commit is contained in:
Matt Brubeck 2016-12-31 10:39:48 -08:00
parent 712adcf737
commit 0f0750df52
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ fn parse_level(summary: &mut Vec<&str>, current_level: i32, mut section: Vec<i32
section.push(0); section.push(0);
let last = items.pop().expect("There should be at least one item since this can't be the root level"); let last = items.pop().expect("There should be at least one item since this can't be the root level");
item = if let BookItem::Chapter(ref s, ref ch) = last { if let BookItem::Chapter(ref s, ref ch) = last {
let mut ch = ch.clone(); let mut ch = ch.clone();
ch.sub_items = try!(parse_level(summary, level, section.clone())); ch.sub_items = try!(parse_level(summary, level, section.clone()));
items.push(BookItem::Chapter(s.clone(), ch)); items.push(BookItem::Chapter(s.clone(), ch));