diff options
author | Stuart Stock <stuart@int08h.com> | 2019-01-19 14:16:51 -0600 |
---|---|---|
committer | Stuart Stock <stuart@int08h.com> | 2019-01-20 09:03:24 -0600 |
commit | a84573f053e4ab36dda3b82b8811bc20dd991844 (patch) | |
tree | 291b6a62f1d9dedb3481e76bfb36729cd17486b0 /src/config | |
parent | bdf087db2f5ebcadf31bd0968b690daa25820489 (diff) | |
download | roughenough-a84573f053e4ab36dda3b82b8811bc20dd991844.zip |
Clean and refactor server's inner loop
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 65204e6..fb7854f 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -112,7 +112,7 @@ pub trait ServerConfig { /// * `ENV` will return an [`EnvironmentConfig`](struct.EnvironmentConfig.html) /// * any other value returns a [`FileConfig`](struct.FileConfig.html) /// -pub fn make_config(arg: &str) -> Result<Box<ServerConfig>, Error> { +pub fn make_config(arg: &str) -> Result<Box<dyn ServerConfig>, Error> { if arg == "ENV" { match EnvironmentConfig::new() { Ok(cfg) => Ok(Box::new(cfg)), @@ -129,7 +129,7 @@ pub fn make_config(arg: &str) -> Result<Box<ServerConfig>, Error> { /// /// Validate configuration settings. Returns `true` if the config is valid, `false` otherwise. /// -pub fn is_valid_config(cfg: &Box<ServerConfig>) -> bool { +pub fn is_valid_config(cfg: &Box<dyn ServerConfig>) -> bool { let mut is_valid = true; if cfg.port() == 0 { |