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:
parent
c1b2bec7d7
commit
56ceb627b8
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue