From 4525810737b678e00c23f26c218db5426df0d714 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 17 Apr 2017 21:58:34 -0400 Subject: [PATCH] Rewrite an emptiness check. --- src/book/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/book/mod.rs b/src/book/mod.rs index a040fe19..d2c5ae4e 100644 --- a/src/book/mod.rs +++ b/src/book/mod.rs @@ -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() {