summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Müller <neikos@neikos.email>2023-01-03 09:55:07 +0100
committerMarcel Müller <neikos@neikos.email>2023-01-04 08:38:40 +0100
commitde69f4eca1506117787586343641823ce9fac973 (patch)
tree18fcd4860577f639dac119bf6da062b66b4a3b03
parent1843cf3888d3a75f9062c596afb268a36d789cb1 (diff)
Use a type alias for BoxFn
Signed-off-by: Marcel Müller <neikos@neikos.email>
-rw-r--r--mqtt-tester/src/command.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/mqtt-tester/src/command.rs b/mqtt-tester/src/command.rs
index 56096b3..38f1c23 100644
--- a/mqtt-tester/src/command.rs
+++ b/mqtt-tester/src/command.rs
@@ -12,10 +12,12 @@ pub struct Command {
inner: tokio::process::Command,
}
+pub type CheckBytesFn = Box<dyn FnOnce(&[u8]) -> bool>;
+
pub enum ClientCommand {
Send(Vec<u8>),
WaitFor(Vec<u8>),
- WaitAndCheck(Box<dyn FnOnce(&[u8]) -> bool>),
+ WaitAndCheck(CheckBytesFn),
}
impl Command {