From a4dcc4b5c53966f3c4366e414a3e39d094f21404 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 20 Sep 2024 23:27:59 -0400 Subject: Push the handling of the `Last-Event-Id` _format_ inside of `channels::app`. This is intended to make it a bit more opaque to callers, and to free me up to experiment with the event ID format. It also makes event IDs tractable for testing. --- src/events/app.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/events/app.rs') diff --git a/src/events/app.rs b/src/events/app.rs index dfb23d7..c3a027d 100644 --- a/src/events/app.rs +++ b/src/events/app.rs @@ -54,7 +54,7 @@ impl Broadcaster { // panic: if ``channel`` has not been previously registered, and was not // part of the initial set of channels. - pub fn broadcast(&self, channel: &channel::Id, message: broadcast::Message) { + pub fn broadcast(&self, channel: &channel::Id, message: &broadcast::Message) { let tx = self.sender(channel); // Per the Tokio docs, the returned error is only used to indicate that @@ -64,7 +64,7 @@ impl Broadcaster { // // The successful return value, which includes the number of active // receivers, also isn't that interesting to us. - let _ = tx.send(message); + let _ = tx.send(message.clone()); } // panic: if ``channel`` has not been previously registered, and was not -- cgit v1.2.3