Skip to content

Commit a8f30d4

Browse files
authored
Merge branch 'master' into jakob/iote-6/amazon-timestamp
2 parents 9495cd1 + 0da32d5 commit a8f30d4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rust/sbp/src/link.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,17 +353,17 @@ mod tests {
353353

354354
#[test]
355355
fn test_custom_event() {
356-
enum ObsMsg {
357-
Obs(MsgObs),
358-
DepA(MsgObsDepA),
356+
enum ObsMsgEvent {
357+
Obs,
358+
DepA,
359359
}
360360

361-
impl Event for ObsMsg {
361+
impl Event for ObsMsgEvent {
362362
const MESSAGE_TYPES: &'static [u16] = &[MsgObs::MESSAGE_TYPE, MsgObsDepA::MESSAGE_TYPE];
363363
fn from_sbp(msg: Sbp) -> Self {
364364
match msg {
365-
Sbp::MsgObs(m) => ObsMsg::Obs(m),
366-
Sbp::MsgObsDepA(m) => ObsMsg::DepA(m),
365+
Sbp::MsgObs(_m) => ObsMsgEvent::Obs,
366+
Sbp::MsgObsDepA(_m) => ObsMsgEvent::DepA,
367367
_ => unreachable!("wrong event keys"),
368368
}
369369
}
@@ -373,7 +373,7 @@ mod tests {
373373
let link = source.link();
374374
let count = RefCell::new(0);
375375

376-
link.register(|count: &RefCell<usize>, _: ObsMsg| {
376+
link.register(|count: &RefCell<usize>, _: ObsMsgEvent| {
377377
*count.borrow_mut() += 1;
378378
});
379379

0 commit comments

Comments
 (0)