Merge pull request #194 from mbrubeck/warnings

Fix some rustc warnings.
This commit is contained in:
Mathieu David 2016-12-31 23:45:23 +01:00 committed by GitHub
commit 375502a6fa
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,4 @@
#[cfg(test)]
#![cfg(test)]
use std::path::Path;
use serde_json;

View file

@ -37,7 +37,7 @@ fn parse_level(summary: &mut Vec<&str>, current_level: i32, mut section: Vec<i32
section.push(0);
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();
ch.sub_items = try!(parse_level(summary, level, section.clone()));
items.push(BookItem::Chapter(s.clone(), ch));