From 0ffcfae47be404ec4b230380b79e8b4627d36e18 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Fri, 2 Jul 2021 11:31:50 -0700 Subject: [PATCH] Warn on more deprecated config keys and profiles. --- core/lib/src/config/config.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/lib/src/config/config.rs b/core/lib/src/config/config.rs index 5f192a4f..e36c7ff7 100644 --- a/core/lib/src/config/config.rs +++ b/core/lib/src/config/config.rs @@ -134,10 +134,11 @@ impl Default for Config { impl Config { const DEPRECATED_KEYS: &'static [(&'static str, Option<&'static str>)] = &[ ("env", Some(Self::PROFILE)), ("log", Some(Self::LOG_LEVEL)), + ("read_timeout", None), ("write_timeout", None), ]; const DEPRECATED_PROFILES: &'static [(&'static str, Option<&'static str>)] = &[ - ("dev", Some("debug")), ("prod", Some("release")), + ("dev", Some("debug")), ("prod", Some("release")), ("stag", None) ]; /// Returns the default configuration for the `debug` profile, _irrespective @@ -353,6 +354,8 @@ impl Config { if let Some(new_key) = replacement { launch_info_!("key has been by replaced by `{}`", Paint::white(new_key)); + } else { + launch_info_!("key has no special meaning"); } } }