summaryrefslogtreecommitdiff
path: root/src/channel/history.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-10 13:26:15 -0400
committerKit La Touche <kit@transneptune.net>2024-10-10 13:26:15 -0400
commit03f8d9ad603a4e523a0e2a0e60ad62c8725f0875 (patch)
treeb01543c0c2dadbd4be17320d47fc2e3d2fdb280d /src/channel/history.rs
parentefae871b1bdb1e01081a44218281950cf0177f3b (diff)
parentd173bc08f2b699f58c8cca752ff688ad46f33ced (diff)
Merge branch 'main' into wip/path-routing-for-channels
Diffstat (limited to 'src/channel/history.rs')
-rw-r--r--src/channel/history.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/channel/history.rs b/src/channel/history.rs
index 383fb7b..78b3437 100644
--- a/src/channel/history.rs
+++ b/src/channel/history.rs
@@ -40,22 +40,20 @@ impl History {
}
fn created(&self) -> Event {
- Event {
+ Created {
instant: self.created,
- kind: Created {
- channel: self.channel.clone(),
- }
- .into(),
+ channel: self.channel.clone(),
}
+ .into()
}
fn deleted(&self) -> Option<Event> {
- self.deleted.map(|instant| Event {
- instant,
- kind: Deleted {
- channel: self.channel.id.clone(),
+ self.deleted.map(|instant| {
+ Deleted {
+ instant,
+ id: self.channel.id.clone(),
}
- .into(),
+ .into()
})
}
}