Derive `Eq` for `StateDsct`.

This commit is contained in:
c0gent 2018-10-15 15:10:36 -07:00
parent e51b8a17c0
commit 48becddc7a
No known key found for this signature in database
GPG Key ID: 9CC25E71A743E892
3 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@ mod hydrabadger;
mod state;
use self::handler::Handler;
use self::state::{State, StateDsct};
use self::state::State;
use bincode;
use hbbft::{
dynamic_honey_badger::Error as DhbError,
@ -14,6 +14,7 @@ use std;
use {Input, Message, Uid};
pub use self::hydrabadger::{Config, Hydrabadger};
pub use self::state::StateDsct;
// Number of times to attempt wire message re-send.
pub const WIRE_MESSAGE_RETRY_MAX: usize = 10;

View File

@ -19,7 +19,7 @@ use rand;
use {Contribution, Input, Message, NetworkNodeInfo, NetworkState, Step, Uid};
/// A `State` discriminant.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum StateDsct {
Disconnected,
DeterminingNetworkState,

View File

@ -72,6 +72,7 @@ pub use hydrabadger::{Config, Hydrabadger};
// TODO: Create a separate, library-wide error type.
pub use hydrabadger::Error;
pub use hbbft::dynamic_honey_badger::Batch;
pub use hydrabadger::StateDsct;
/// Transmit half of the wire message channel.
// TODO: Use a bounded tx/rx (find a sensible upper bound):