diff --git a/src/app.rs b/src/app.rs index 2ee85c2e2dca0..e599499afe3c9 100644 --- a/src/app.rs +++ b/src/app.rs @@ -62,13 +62,8 @@ impl ApplicationConfig { ) -> Result { let config_paths = opts.config_paths_with_formats(); - let graceful_shutdown_duration = if opts.no_graceful_shutdown_limit { - None - } else { - Some(Duration::from_secs(u64::from( - opts.graceful_shutdown_limit_secs, - ))) - }; + let graceful_shutdown_duration = (!opts.no_graceful_shutdown_limit) + .then(|| Duration::from_secs(u64::from(opts.graceful_shutdown_limit_secs))); let config = load_configs( &config_paths,