From d0f0b650bd84c997248c1e072c4e1b04acd6f8b5 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 21 Nov 2022 18:07:28 +0100 Subject: [PATCH] chore: Move impl for type after its definition --- .../src/room/timeline/event_handler.rs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/matrix-sdk/src/room/timeline/event_handler.rs b/crates/matrix-sdk/src/room/timeline/event_handler.rs index c0eb4e22a..7d5c1e35b 100644 --- a/crates/matrix-sdk/src/room/timeline/event_handler.rs +++ b/crates/matrix-sdk/src/room/timeline/event_handler.rs @@ -318,6 +318,16 @@ struct TimelineEventMetadata { encryption_info: Option, } +#[derive(Clone)] +enum TimelineEventKind { + Message { content: AnyMessageLikeEventContent }, + RedactedMessage, + Redaction { redacts: OwnedEventId, content: RoomRedactionEventContent }, + // FIXME: Split further for state keys of different type + State { _content: AnyStateEventContent }, + RedactedState, // AnyRedactedStateEventContent +} + impl From for TimelineEventKind { fn from(event: AnySyncTimelineEvent) -> Self { match event { @@ -340,16 +350,6 @@ impl From for TimelineEventKind { } } -#[derive(Clone)] -enum TimelineEventKind { - Message { content: AnyMessageLikeEventContent }, - RedactedMessage, - Redaction { redacts: OwnedEventId, content: RoomRedactionEventContent }, - // FIXME: Split further for state keys of different type - State { _content: AnyStateEventContent }, - RedactedState, // AnyRedactedStateEventContent -} - enum TimelineItemPosition { Start, End,