We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15e2838 commit 01ea738Copy full SHA for 01ea738
src/app.rs
@@ -62,13 +62,8 @@ impl ApplicationConfig {
62
) -> Result<Self, ExitCode> {
63
let config_paths = opts.config_paths_with_formats();
64
65
- let graceful_shutdown_duration = if opts.no_graceful_shutdown_limit {
66
- None
67
- } else {
68
- Some(Duration::from_secs(u64::from(
69
- opts.graceful_shutdown_limit_secs,
70
- )))
71
- };
+ let graceful_shutdown_duration = (!opts.no_graceful_shutdown_limit)
+ .then(|| Duration::from_secs(u64::from(opts.graceful_shutdown_limit_secs)));
72
73
let config = load_configs(
74
&config_paths,
0 commit comments