syn2 + structmeta

This commit is contained in:
Robin Appelman 2023-04-01 22:58:47 +02:00
commit a6b5e67ce8
4 changed files with 64 additions and 23 deletions

View file

@ -9,7 +9,7 @@ use crate::event::Event;
use crate::events::Events;
use proc_macro2::TokenStream;
use quote::ToTokens;
use std::fmt::{Debug, Display};
use std::fmt::Display;
use syn::{parse_macro_input, DeriveInput, Error, Result};
/// Derive the `Event` trait for a struct
@ -44,7 +44,7 @@ trait Derivable {
fn derive(params: Self::Params) -> Result<TokenStream>;
}
trait DeriveParams: Sized + Debug {
trait DeriveParams: Sized {
fn parse(input: &DeriveInput) -> Result<Self>;
}