mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
Display default value for --maximum-resolution-timeout
in help
This commit is contained in:
parent
51738a923c
commit
c596b845c3
2 changed files with 6 additions and 6 deletions
|
@ -191,9 +191,10 @@ pub struct Args {
|
||||||
#[clap(
|
#[clap(
|
||||||
help_heading = "Overrides",
|
help_heading = "Overrides",
|
||||||
long,
|
long,
|
||||||
env = "BINSTALL_MAXIMUM_RESOLUTION_TIMEOUT"
|
env = "BINSTALL_MAXIMUM_RESOLUTION_TIMEOUT",
|
||||||
|
default_value_t = NonZeroU16::new(180).unwrap(),
|
||||||
)]
|
)]
|
||||||
pub(crate) maximum_resolution_timeout: Option<NonZeroU16>,
|
pub(crate) maximum_resolution_timeout: NonZeroU16,
|
||||||
|
|
||||||
/// This flag is now enabled by default thus a no-op.
|
/// This flag is now enabled by default thus a no-op.
|
||||||
///
|
///
|
||||||
|
|
|
@ -210,10 +210,9 @@ pub fn install_crates(
|
||||||
},
|
},
|
||||||
disable_telemetry: args.disable_telemetry,
|
disable_telemetry: args.disable_telemetry,
|
||||||
|
|
||||||
maximum_resolution_timeout: args
|
maximum_resolution_timeout: Duration::from_secs(
|
||||||
.maximum_resolution_timeout
|
args.maximum_resolution_timeout.get().into(),
|
||||||
.map(|n| Duration::from_secs(n.get().into()))
|
),
|
||||||
.unwrap_or(Duration::from_secs(180)),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Destruct args before any async function to reduce size of the future
|
// Destruct args before any async function to reduce size of the future
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue