mirror of
https://github.com/rust-lang/mdBook
synced 2025-03-04 23:27:17 +00:00
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
1 changed files with 1 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue