summaryrefslogtreecommitdiff
path: root/src/bindings.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-05 18:00:04 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-05 18:14:38 +0200
commit6786468a0d83965c80394e88dbea937d3e5a8171 (patch)
treec4d55880d70ce3d12041b1d9bcc8c68ff5cc28ab /src/bindings.rs
parentfd5097f1575d42c2696eda87e147117387b07375 (diff)
downloadsubplot-6786468a0d83965c80394e88dbea937d3e5a8171.tar.gz
Revert "clippy: Use matches macro"
This reverts commit 7015e69a2c8bc2894f89b3b7f85fc2bff653933e. matches! doesn't work with Debian buster's rustc. Our CI uses that rustc, for now, so I think we should avoid matches! until we've updated the CI.
Diffstat (limited to 'src/bindings.rs')
-rw-r--r--src/bindings.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/bindings.rs b/src/bindings.rs
index 1223910..adee196 100644
--- a/src/bindings.rs
+++ b/src/bindings.rs
@@ -494,10 +494,10 @@ mod test_bindings {
let binding = Binding::new(StepKind::When, r"I am Tomjon", "set_foo", None, false).unwrap();
let mut bindings = Bindings::new();
bindings.add(binding);
- assert!(matches!(
- bindings.find(&step),
- Err(SubplotError::BindingUnknown(_))
- ));
+ assert!(match bindings.find(&step) {
+ Err(SubplotError::BindingUnknown(_)) => true,
+ _ => false,
+ });
}
#[test]
@@ -513,10 +513,10 @@ mod test_bindings {
.unwrap();
let mut bindings = Bindings::new();
bindings.add(binding);
- assert!(matches!(
- bindings.find(&step),
- Err(SubplotError::BindingUnknown(_))
- ));
+ assert!(match bindings.find(&step) {
+ Err(SubplotError::BindingUnknown(_)) => true,
+ _ => false,
+ });
}
#[test]
@@ -535,10 +535,10 @@ mod test_bindings {
)
.unwrap(),
);
- assert!(matches!(
- bindings.find(&step),
- Err(SubplotError::BindingNotUnique(_))
- ));
+ assert!(match bindings.find(&step) {
+ Err(SubplotError::BindingNotUnique(_)) => true,
+ _ => false,
+ });
}
#[test]