Finite state machines in rust; bendns fork to add types.
-rw-r--r--rust-fsm-dsl/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust-fsm-dsl/src/lib.rs b/rust-fsm-dsl/src/lib.rs
index 1e9ba99..85fe2f4 100644
--- a/rust-fsm-dsl/src/lib.rs
+++ b/rust-fsm-dsl/src/lib.rs
@@ -177,7 +177,7 @@ pub fn state_machine(tokens: TokenStream) -> TokenStream {
impl #input_generics #f #input_generics {
#input_visibility fn name(&self) -> &'static str {
- match self { #(Self::#matcher => stringify!(#x),)* _ => unreachable!(), }
+ match *self { #(Self::#matcher => stringify!(#x),)* }
}
}
}
@@ -195,7 +195,7 @@ pub fn state_machine(tokens: TokenStream) -> TokenStream {
impl #f {
#state_visibility fn name(&self) -> &'static str {
- match self { #(Self::#matcher => stringify!(#x),)* _ => unreachable!(), }
+ match *self { #(Self::#matcher => stringify!(#x),)* }
}
}
}
@@ -214,7 +214,7 @@ pub fn state_machine(tokens: TokenStream) -> TokenStream {
impl #output_generics #output_name #output_generics {
#output_visibility fn name(&self) -> &'static str {
- match self { #(Self::#matcher => stringify!(#outputs),)* _ => unreachable!(), }
+ match *self { #(Self::#matcher => stringify!(#outputs),)* }
}
}
}