Move test functions out of lib

This commit is contained in:
rishflab 2020-10-09 09:28:51 +11:00
parent 61a8a3e428
commit bf576bf251
4 changed files with 57 additions and 33 deletions

View file

@ -88,19 +88,6 @@ pub enum State {
State6(State6),
}
// TODO: use macro or generics
pub fn is_state4(state: &State) -> bool {
matches!(state, State::State4 { .. })
}
// TODO: use macro or generics
pub fn is_state5(state: &State) -> bool {
matches!(state, State::State5 { .. })
}
// TODO: use macro or generics
pub fn is_state6(state: &State) -> bool {
matches!(state, State::State6 { .. })
}
macro_rules! impl_try_from_parent_state {
($type:ident) => {
impl TryFrom<State> for $type {

View file

@ -124,16 +124,6 @@ impl_from_child_state!(State3);
impl_from_child_state!(State4);
impl_from_child_state!(State5);
// TODO: use macro or generics
pub fn is_state5(state: &State) -> bool {
matches!(state, State::State5 { .. })
}
// TODO: use macro or generics
pub fn is_state3(state: &State) -> bool {
matches!(state, State::State3 { .. })
}
#[derive(Debug)]
pub struct State0 {
b: bitcoin::SecretKey,