derive traits

This commit is contained in:
Skye 2023-01-05 18:45:58 +09:00
parent f6f26a9d63
commit 9b7344cadb
Signed by: me
GPG key ID: 0104BC05F41B77B8
2 changed files with 6 additions and 1 deletions
src
uwurandom-proc-macros/src

View file

@ -91,6 +91,7 @@ static ACTIONS: [&str; 12] = [
"*lies down on a random surface*", "*lies down on a random surface*",
]; ];
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum StateMachine { pub enum StateMachine {
Uwu { Uwu {
left: u8, left: u8,
@ -234,6 +235,7 @@ impl StateMachine {
} }
} }
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum CatgirlNonsenseMachine { pub enum CatgirlNonsenseMachine {
StartM, StartM,
StartR, StartR,
@ -280,6 +282,7 @@ impl CatgirlNonsenseMachine {
} }
} }
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ScrunklyMachine { pub enum ScrunklyMachine {
StartA, StartA,
StartW, StartW,
@ -320,6 +323,7 @@ impl ScrunklyMachine {
} }
} }
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum NyaaaaaaaMachine { pub enum NyaaaaaaaMachine {
N, N,
Y, Y,
@ -347,6 +351,7 @@ impl NyaaaaaaaMachine {
} }
} }
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BlushMachine { pub enum BlushMachine {
Start, Start,
Middle { left: u8 }, Middle { left: u8 },

View file

@ -56,7 +56,7 @@ pub fn gen_fsm(item: TokenStream) -> TokenStream {
} }
let variant_count = input.len() as u32; let variant_count = input.len() as u32;
quote!( quote!(
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum StateMachine { pub enum StateMachine {
#variants #variants
} }