diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-09-20 23:27:59 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-09-20 23:27:59 -0400 |
| commit | a4dcc4b5c53966f3c4366e414a3e39d094f21404 (patch) | |
| tree | cc6b3ab3876bb05a81d03569aa6d9a42cdc3c6d1 /src/events/app.rs | |
| parent | 0a05491930fb34ce7c93c33ea0b7599360483fc7 (diff) | |
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.
Diffstat (limited to 'src/events/app.rs')
| -rw-r--r-- | src/events/app.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
