macros: Fix missing type qualification in Event derive macro

This commit is contained in:
Jonas Platte 2022-03-30 17:28:33 +02:00
parent 5ec3ad2290
commit a4aa7e0912
No known key found for this signature in database
GPG Key ID: BBA95679259D342F
2 changed files with 6 additions and 4 deletions

View File

@ -5,9 +5,9 @@ use serde::{Deserialize, Serialize};
use super::{
EphemeralRoomEventContent, GlobalAccountDataEventContent, MessageLikeEventContent,
MessageLikeEventType, MessageLikeUnsigned, RedactedMessageLikeEventContent,
RedactedStateEventContent, RedactedUnsigned, RoomAccountDataEventContent, StateEventContent,
StateEventType, StateUnsigned, ToDeviceEventContent,
MessageLikeUnsigned, RedactedMessageLikeEventContent, RedactedStateEventContent,
RedactedUnsigned, RoomAccountDataEventContent, StateEventContent, StateUnsigned,
ToDeviceEventContent,
};
use crate::{EventId, MilliSecondsSinceUnixEpoch, RoomId, UserId};

View File

@ -384,7 +384,9 @@ fn expand_redact_event(
where_clause.predicates.push(parse_quote! { #ty_param: #ruma_common::events::RedactContent });
where_clause.predicates.push(parse_quote! {
<#ty_param as #ruma_common::events::RedactContent>::Redacted:
#ruma_common::events::EventContent<EventType = #redacted_event_type_enum>
#ruma_common::events::EventContent<
EventType = #ruma_common::events::#redacted_event_type_enum
>
+ #ruma_common::events::RedactedEventContent
});