diff --git a/src/input.rs b/src/input.rs index 5b6a4e67..1e7aec2f 100644 --- a/src/input.rs +++ b/src/input.rs @@ -137,11 +137,7 @@ impl<'a> Input<'a> { } pub fn is_stdin(&self) -> bool { - if let InputKind::StdIn = self.kind { - true - } else { - false - } + matches!(self.kind, InputKind::StdIn) } pub fn with_name(mut self, provided_name: Option<&OsStr>) -> Self { diff --git a/src/output.rs b/src/output.rs index 602bc42e..de11a9d2 100644 --- a/src/output.rs +++ b/src/output.rs @@ -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"))]