Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions connect/src/spirc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,16 @@ impl SpircTask {
}
}
};
( $next:expr, match |$ok:ident| $use_ok:expr ) => {
( $next:expr, $log:ident!($msg:expr), match |$ok:ident| $use_ok:expr ) => {
unwrap!($next, |$ok| match $ok {
Ok($ok) => $use_ok,
Err(why) => error!("could not parse {}: {}", stringify!($ok), why),
Err(why) => $log!("{} could not parse {}: {}", $msg, stringify!($ok), why),
})
};

( $next:expr, match |$ok:ident| $use_ok:expr ) => {
unwrap! { $next, error!(""), match |$ok| $use_ok }
};
Comment thread
photovoltex marked this conversation as resolved.
Outdated
}

if let Err(why) = self.session.dealer().start().await {
Expand Down Expand Up @@ -486,6 +490,7 @@ impl SpircTask {
},
session_update = self.session_update.next() => unwrap! {
session_update,
warn!("Known parsing error for WIFI_BROADCAST_CHANGED."),
match |session_update| self.handle_session_update(session_update)
},
cmd = async { commands?.recv().await }, if commands.is_some() => if let Some(cmd) = cmd {
Expand Down