book: simplify is_draft_chapter

As suggested by clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
This commit is contained in:
Riccardo Magliocchetti 2021-05-30 14:54:19 +02:00
parent c1b2bec7d7
commit 56ceb627b8
1 changed files with 1 additions and 4 deletions

View File

@ -200,10 +200,7 @@ impl Chapter {
/// Check if the chapter is a draft chapter, meaning it has no path to a source markdown file.
pub fn is_draft_chapter(&self) -> bool {
match self.path {
Some(_) => false,
None => true,
}
self.path.is_none()
}
}