Import Event trait in Serialize impl so event_type can be called.
This commit is contained in:
parent
f663c79250
commit
52754f617c
@ -281,6 +281,8 @@ impl ToTokens for RumaEvent {
|
||||
where
|
||||
S: serde::Serializer
|
||||
{
|
||||
use crate::Event as _;
|
||||
|
||||
let mut state = serializer.serialize_struct(#name_str, #field_count)?;
|
||||
|
||||
#(#serialize_field_calls)*
|
||||
|
@ -76,8 +76,6 @@ impl From<serde_json::Error> for InvalidEvent {
|
||||
|
||||
// See note about wrapping macro expansion in a module from `src/lib.rs`
|
||||
pub mod common_case {
|
||||
use super::Event;
|
||||
|
||||
use ruma_events_macros::ruma_event;
|
||||
|
||||
ruma_event! {
|
||||
@ -94,8 +92,6 @@ pub mod common_case {
|
||||
}
|
||||
|
||||
pub mod extra_fields {
|
||||
use super::Event;
|
||||
|
||||
use ruma_events_macros::ruma_event;
|
||||
|
||||
ruma_event! {
|
||||
@ -116,8 +112,6 @@ pub mod extra_fields {
|
||||
}
|
||||
|
||||
pub mod type_alias {
|
||||
use super::Event;
|
||||
|
||||
use ruma_events_macros::ruma_event;
|
||||
|
||||
ruma_event! {
|
||||
|
Loading…
x
Reference in New Issue
Block a user