summaryrefslogtreecommitdiff
path: root/src/broadcast.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-03 23:30:42 -0400
committerKit La Touche <kit@transneptune.net>2024-10-03 23:30:42 -0400
commitd50b1b56c011c03c7d8a95242af404b727e91a80 (patch)
treeefe3408f6a8ef669981826d1a29d16a24b460d89 /src/broadcast.rs
parent30c13478d61065a512f5bc8824fecbf2ee6afc81 (diff)
parent7f12fd41c2941a55a6437f24e4f780104a718790 (diff)
Merge branch 'main' into feature-frontend
Diffstat (limited to 'src/broadcast.rs')
-rw-r--r--src/broadcast.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/broadcast.rs b/src/broadcast.rs
index 083a301..bedc263 100644
--- a/src/broadcast.rs
+++ b/src/broadcast.rs
@@ -32,7 +32,7 @@ where
{
// panic: if ``message.channel.id`` has not been previously registered,
// and was not part of the initial set of channels.
- pub fn broadcast(&self, message: &M) {
+ pub fn broadcast(&self, message: impl Into<M>) {
let tx = self.sender();
// Per the Tokio docs, the returned error is only used to indicate that
@@ -42,7 +42,7 @@ where
//
// The successful return value, which includes the number of active
// receivers, also isn't that interesting to us.
- let _ = tx.send(message.clone());
+ let _ = tx.send(message.into());
}
// panic: if ``channel`` has not been previously registered, and was not