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

View file

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

View file

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