Finite state machines in rust; bendns fork to add types.
rust-fsm: disable clippy warning on INITIAL_STATE
Yevhenii Babichenko 2020-03-30
parent 777eae3 · commit 7599849
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index aaef824..b4b5396 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -127,6 +127,8 @@ pub trait StateMachineImpl {
/// The output alphabet.
type Output;
/// The initial state of the machine.
+ // allow since there is usually no interior mutability because states are enums
+ #[allow(clippy::declare_interior_mutable_const)]
const INITIAL_STATE: Self::State;
/// The transition fuction that outputs a new state based on the current
/// state and the provided input. Outputs `None` when there is no transition