From f5531cc7faabe75f9b1460446e5249ad1f839911 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Sun, 15 Nov 2020 13:29:09 +0100 Subject: remove all matches --- src/input.rs | 6 +++++- src/output.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/input.rs b/src/input.rs index 1e7aec2f..5b6a4e67 100644 --- a/src/input.rs +++ b/src/input.rs @@ -137,7 +137,11 @@ impl<'a> Input<'a> { } pub fn is_stdin(&self) -> bool { - matches!(self.kind, InputKind::StdIn) + if let InputKind::StdIn = self.kind { + true + } else { + false + } } pub fn with_name(mut self, provided_name: Option<&OsStr>) -> Self { diff --git a/src/output.rs b/src/output.rs index 32a94a4c..689371b9 100644 --- a/src/output.rs +++ b/src/output.rs @@ -150,7 +150,11 @@ impl OutputType { #[cfg(feature = "paging")] pub(crate) fn is_pager(&self) -> bool { - matches!(self, OutputType::Pager(_)) + if let OutputType::Pager(_) = self { + true + } else { + false + } } #[cfg(not(feature = "paging"))] -- cgit v1.2.3