Rewrite an emptiness check.

This commit is contained in:
Corey Farwell 2017-04-17 21:58:34 -04:00
parent 5d72d966ad
commit 4525810737
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ impl MDBook {
BookItem::Chapter(_, ref ch) |
BookItem::Affix(ref ch) => ch,
};
if ch.path != PathBuf::new() {
if ch.path.as_os_str().is_empty() {
let path = self.src.join(&ch.path);
if !path.exists() {