Use matches!() for true/false returning match statements (#2176)

This commit is contained in:
Joseph T. Lyons
2020-07-14 20:11:41 -04:00
committed by GitHub
parent 17e6c53b62
commit 0934410b38
11 changed files with 19 additions and 70 deletions

View File

@ -264,10 +264,7 @@ impl DebugDocBuilder {
}
pub fn is_empty(&self) -> bool {
match &self.inner.1 {
pretty::Doc::Nil => true,
_ => false,
}
matches!(&self.inner.1, pretty::Doc::Nil)
}
pub fn or(self, doc: DebugDocBuilder) -> DebugDocBuilder {