Skip to content

Commit

Permalink
feat: simplify Outgoing::new
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianSpeitel committed Jul 11, 2024
1 parent ac9dc15 commit dae7ca7
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,20 +208,11 @@ impl<T> AsRef<T> for Outgoing<T> {
}
}

impl Outgoing<irc::Command> {
impl<T> Outgoing<T> {
/// Create a new outgoing command event
#[inline]
#[must_use]
pub fn new(command: irc::Command) -> Self {
Self(command)
}
}

impl Outgoing<irc::Message> {
/// Create a new outgoing message event
#[inline]
#[must_use]
pub fn new(message: irc::Message) -> Self {
Self(message)
pub fn new(msg: T) -> Self {
Self(msg)
}
}

0 comments on commit dae7ca7

Please sign in to comment.