Preserve non-'Config' values in 'Client::debug()'.

This commit is contained in:
Sergio Benitez 2021-04-07 19:37:16 -07:00
parent 8a2592c257
commit 764ea06e90
1 changed files with 4 additions and 3 deletions

View File

@ -103,10 +103,11 @@ macro_rules! pub_client_impl {
#[doc(hidden)]
pub $($prefix)? fn debug(rocket: Rocket) -> Result<Self, Error> {
let config = rocket.figment().clone()
.merge(("log_level", crate::config::LogLevel::Debug))
.merge(("profile", crate::Config::DEBUG_PROFILE));
let mut config = rocket.config.clone();
config.log_level = crate::config::LogLevel::Debug;
config.profile = crate::Config::DEBUG_PROFILE;
let config = rocket.figment().clone().merge(config);
Self::tracked(rocket.reconfigure(config)) $(.$suffix)?
}