https://github.com/trussed-dev/trussed/blob/main/src/api/macros.rs#L96
impl From<Reply> for $reply {
fn from(reply: Reply) -> reply::$reply {
match reply {
Reply::$reply(reply) => reply,
_ => { unsafe { unreachable_unchecked() } }
}
}
}
This unsafe is not sound and this impl is part of the public API. I think we could replace it with a panic!, since it is only used by PollClient::request. To reduce the risk of panicking I would instead use TryFrom.
https://github.com/trussed-dev/trussed/blob/main/src/api/macros.rs#L96
This
unsafeis not sound and this impl is part of the public API. I think we could replace it with apanic!, since it is only used byPollClient::request. To reduce the risk of panicking I would instead useTryFrom.