1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-17 02:32:26 +01:00

Use new matches!(…) macro to simplify code

This commit is contained in:
sharkdp
2021-01-09 15:27:54 +01:00
committed by David Peter
parent 09fbabb0b8
commit 03a2710a08
2 changed files with 2 additions and 10 deletions

View File

@@ -150,11 +150,7 @@ impl OutputType {
#[cfg(feature = "paging")]
pub(crate) fn is_pager(&self) -> bool {
if let OutputType::Pager(_) = self {
true
} else {
false
}
matches!(self, OutputType::Pager(_))
}
#[cfg(not(feature = "paging"))]