Merge pull request #194 from mbrubeck/warnings
Fix some rustc warnings.
This commit is contained in:
commit
375502a6fa
|
@ -1,4 +1,4 @@
|
||||||
#[cfg(test)]
|
#![cfg(test)]
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use serde_json;
|
use serde_json;
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue