From dae7ca7afbadc0c90f6b66b3e92b9d2a1d24c79a Mon Sep 17 00:00:00 2001 From: Sebastian Speitel Date: Thu, 11 Jul 2024 20:41:59 +0200 Subject: [PATCH] feat: simplify Outgoing::new --- src/components.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/components.rs b/src/components.rs index ddece16..a65d62d 100644 --- a/src/components.rs +++ b/src/components.rs @@ -208,20 +208,11 @@ impl AsRef for Outgoing { } } -impl Outgoing { +impl Outgoing { /// Create a new outgoing command event #[inline] #[must_use] - pub fn new(command: irc::Command) -> Self { - Self(command) - } -} - -impl Outgoing { - /// 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) } }