diff options
Diffstat (limited to 'src/channel/history.rs')
| -rw-r--r-- | src/channel/history.rs | 18 |
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() }) } } |
