on master help sign in
remove all matches
commitf5531cc7faabe75f9b1460446e5249ad1f839911 authorMarcoIeni <11428655+MarcoIeni@users.noreply.github.com> dateSun 15 Nov 2020, 13:29 (6 years ago) parent2ccff14
2 files changed+10−2
src/input.rs+5−1 src/output.rs+5−1
src/input.rs+5−1
@@ -137,7 +137,11 @@ impl<'a> Input<'a> {
137137 }
138138
139139 pub fn is_stdin(&self) -> bool {
140− matches!(self.kind, InputKind::StdIn)
140+ if let InputKind::StdIn = self.kind {
141+ true
142+ } else {
143+ false
144+ }
141145 }
142146
143147 pub fn with_name(mut self, provided_name: Option<&OsStr>) -> Self {
src/output.rs+5−1
@@ -150,7 +150,11 @@ impl OutputType {
150150
151151 #[cfg(feature = "paging")]
152152 pub(crate) fn is_pager(&self) -> bool {
153− matches!(self, OutputType::Pager(_))
153+ if let OutputType::Pager(_) = self {
154+ true
155+ } else {
156+ false
157+ }
154158 }
155159
156160 #[cfg(not(feature = "paging"))]