improv: impl From<M> for Message<M>

This commit is contained in:
Michael Aaron Murphy 2024-05-21 01:29:50 +02:00
parent f4936344f0
commit aa3f5d3401
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
3 changed files with 8 additions and 2 deletions

View file

@ -37,6 +37,12 @@ pub mod message {
pub const fn none<M>() -> Message<M> {
Message::None
}
impl<M> From<M> for Message<M> {
fn from(value: M) -> Self {
Self::App(value)
}
}
}
pub use self::command::Command;