Change name, basic pairing indicator flag
This commit is contained in:
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user