Skip to content

Commit 4525810

Browse files
committed
Rewrite an emptiness check.
1 parent 5d72d96 commit 4525810

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/book/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl MDBook {
185185
BookItem::Chapter(_, ref ch) |
186186
BookItem::Affix(ref ch) => ch,
187187
};
188-
if ch.path != PathBuf::new() {
188+
if ch.path.as_os_str().is_empty() {
189189
let path = self.src.join(&ch.path);
190190

191191
if !path.exists() {

0 commit comments

Comments
 (0)