diff options
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r-- | src/config/mod.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 658669a..772e1ee 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -37,8 +37,8 @@ pub use self::environment::EnvironmentConfig; mod memory; pub use self::memory::MemoryConfig; -use Error; use key::KeyProtection; +use Error; /// Maximum number of requests to process in one batch and include the the Merkle tree. pub const DEFAULT_BATCH_SIZE: u8 = 64; @@ -98,7 +98,6 @@ pub trait ServerConfig { Ok(v) => Ok(v), Err(_) => Err(Error::InvalidConfiguration(addr)), } - } } @@ -145,14 +144,22 @@ pub fn is_valid_config(cfg: &Box<ServerConfig>) -> bool { is_valid = false; } if cfg.batch_size() < 1 || cfg.batch_size() > 64 { - error!("batch_size {} is invalid; valid range 1-64", cfg.batch_size()); + error!( + "batch_size {} is invalid; valid range 1-64", + cfg.batch_size() + ); is_valid = false; } if is_valid { match cfg.socket_addr() { Err(e) => { - error!("failed to create socket {}:{} {:?}", cfg.interface(), cfg.port(), e); + error!( + "failed to create socket {}:{} {:?}", + cfg.interface(), + cfg.port(), + e + ); is_valid = false; } _ => (), |