refactor(sdk): Remove unnecessary inner block in function
@@ -525,23 +525,19 @@ impl<'a, 'i> TimelineEventHandler<'a, 'i> {
self.result.item_added = true;
let NewEventTimelineItem { content } = item;
-
- let item = {
let sender = self.meta.sender.to_owned();
let sender_profile = self.meta.sender_profile.clone();
let mut reactions = self.pending_reactions().unwrap_or_default();
- match &self.flow {
- Flow::Local { txn_id, timestamp } => {
- EventTimelineItem::Local(LocalEventTimelineItem {
+ let item = match &self.flow {
+ Flow::Local { txn_id, timestamp } => EventTimelineItem::Local(LocalEventTimelineItem {
send_state: EventSendState::NotSentYet,
transaction_id: txn_id.to_owned(),
sender,
sender_profile,
timestamp: *timestamp,
content,
- })
- }
+ }),
Flow::Remote { event_id, origin_server_ts, raw_event, .. } => {
// Drop pending reactions if the message is redacted.
if let TimelineItemContent::RedactedMessage = content {
@@ -562,7 +558,6 @@ impl<'a, 'i> TimelineEventHandler<'a, 'i> {
raw: raw_event.clone(),
})
}
- }
};
let item = Arc::new(TimelineItem::Event(item));
