Change name, basic pairing indicator flag

This commit is contained in:
2024-08-28 21:06:38 -04:00
parent f5cd9872bd
commit 326660ab43
5 changed files with 100 additions and 39 deletions

View File

@ -27,7 +27,7 @@ pub struct MessageTimer <Q, S> {
state: State,
}
impl<Q: PartialEq, S: Copy> MessageTimer<Q, S> {
impl<Q: PartialEq, S: Clone> MessageTimer<Q, S> {
pub fn new(
restart: Q,
cancel: Q,
@ -54,7 +54,7 @@ impl<Q: PartialEq, S: Copy> MessageTimer<Q, S> {
ms: u64,
dp: &mut Dispatch,
) -> MessageTimer<Commands, Commands> {
let cmds = vec![restart, cancel];
let cmds = vec![restart.clone(), cancel.clone()];
let s = dp.get_cmd_channel();
let r = dp.get_callback_channel(&cmds);
let duration = Duration::from_millis(ms);
@ -95,7 +95,7 @@ impl<Q: PartialEq, S: Copy> MessageTimer<Q, S> {
}
Err(_) => {
trace!("Timeout reached");
self.send_q.send(self.done).await.expect("Failed to send timeout");
self.send_q.send(self.done.clone()).await.expect("Failed to send timeout");
}
}
}