diff --git a/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine.rs b/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine.rs index 0e557dee71..fa14ef1a8f 100644 --- a/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine.rs +++ b/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine.rs @@ -31,10 +31,10 @@ use sp_std::fmt::Debug; /// `input_index`, an election with these election properties is going to be created automatically. /// /// ## Idle results -/// When there is no consensus, the electoral system still has to return sth in its `on_finalize` -/// function. This value is provided by the `get(&State) -> DisplayState` function. The associated -/// `DisplayState` type is an arbitrary "summary" of the current state, meant for consumers of the -/// `on_finalize` result. +/// When there is no consensus, the electoral system still has to return something in its +/// `on_finalize` function. This value is provided by the `get(&State) -> DisplayState` function. +/// The associated `DisplayState` type is an arbitrary "summary" of the current state, meant for +/// consumers of the `on_finalize` result. /// /// Note: it might be that this functionality is going to be modelled differently in the future. /// @@ -54,7 +54,6 @@ pub trait StateMachine: 'static { type Settings; type Output: Validate; type State: Validate; - // type DisplayState; /// To every state, this function associates a set of input indices which /// describes what kind of input(s) we want to receive next. diff --git a/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine_es.rs b/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine_es.rs index f041122f65..b22ec95f33 100644 --- a/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine_es.rs +++ b/state-chain/pallets/cf-elections/src/electoral_systems/state_machine/state_machine_es.rs @@ -15,21 +15,6 @@ use super::{ state_machine::StateMachine, }; -pub trait IntoResult { - type Ok; - type Err; - - fn into_result(self) -> Result; -} - -impl IntoResult for Result { - type Ok = A; - type Err = B; - fn into_result(self) -> Result { - self - } -} - /// This is an Either type, unfortunately it's more ergonomic /// to recreate this instead of using `itertools::Either`, because /// we need a special implementation of Indexed: we want the vote to