fix: improve error handling and code robustness
- state_machine.rs: if-let replaces is_some()+take().unwrap() - state_machine.rs: expect() replaces unwrap() with invariant docs - wifi/mod.rs: send_result uses self.id() instead of hardcoded string
This commit is contained in:
@@ -111,7 +111,7 @@ impl WifiPlugin {
|
||||
.context("wifi plugin context is not initialized")?;
|
||||
|
||||
ctx.tx.send(Envelope {
|
||||
from: "wifi".to_string(),
|
||||
from: self.id().to_string(),
|
||||
to: Destination::Broadcast,
|
||||
message: Message::WifiResult(payload),
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user