summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcoIeni <11428655+MarcoIeni@users.noreply.github.com>2020-11-15 13:29:09 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2020-11-23 14:25:01 +0100
commitf5531cc7faabe75f9b1460446e5249ad1f839911 (patch)
treed4cf936ec6ed054f82c6a0b5439b237f8f3c6ae1
parent2ccff145ed67044e808dc8b1d27fe0d0329d06af (diff)
remove all matches
-rw-r--r--src/input.rs6
-rw-r--r--src/output.rs6
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"))]