Import Event trait in Serialize impl so event_type can be called.

This commit is contained in:
Jimmy Cuadra 2019-06-19 23:36:16 -07:00
parent f663c79250
commit 52754f617c
2 changed files with 2 additions and 6 deletions

View File

@ -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)*

View File

@ -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! {