diff --git a/src/action/info.rs b/src/action/info.rs index 6c06fe3..3e87403 100644 --- a/src/action/info.rs +++ b/src/action/info.rs @@ -67,7 +67,8 @@ impl<'a> Info<'a> { .invoke(&client) .map_err(|err| { print_error(err.context("failed to fetch file metadata, showing limited info")) - }).ok(); + }) + .ok(); // Get the TTL duration let ttl_millis = info.ttl_millis() as i64; diff --git a/src/cmd/handler.rs b/src/cmd/handler.rs index 4f2a135..5cfd8a4 100644 --- a/src/cmd/handler.rs +++ b/src/cmd/handler.rs @@ -41,7 +41,8 @@ impl<'a: 'b, 'b> Handler<'a> { The public Send service that is used as default host is provided by Mozilla.\n\ This application is not affiliated with Mozilla, Firefox or Firefox Send.\ ", - ).global_setting(AppSettings::GlobalVersion) + ) + .global_setting(AppSettings::GlobalVersion) .global_setting(AppSettings::VersionlessSubcommands) // TODO: enable below command when it doesn't break `p` anymore. // .global_setting(AppSettings::InferSubcommands) @@ -51,28 +52,32 @@ impl<'a: 'b, 'b> Handler<'a> { .short("f") .global(true) .help("Force the action, ignore warnings"), - ).arg( + ) + .arg( Arg::with_name("no-interact") .long("no-interact") .short("I") .alias("no-interactive") .global(true) .help("Not interactive, do not prompt"), - ).arg( + ) + .arg( Arg::with_name("yes") .long("yes") .short("y") .alias("assume-yes") .global(true) .help("Assume yes for prompts"), - ).arg( + ) + .arg( Arg::with_name("verbose") .long("verbose") .short("v") .multiple(true) .global(true) .help("Enable verbose information and logging"), - ).subcommand(CmdDebug::build()) + ) + .subcommand(CmdDebug::build()) .subcommand(CmdDelete::build()) .subcommand(CmdDownload::build().display_order(2)) .subcommand(CmdExists::build()) @@ -95,7 +100,8 @@ impl<'a: 'b, 'b> Handler<'a> { .hide_default_value(true) .env("FFSEND_HISTORY") .hide_env_values(true), - ).arg( + ) + .arg( Arg::with_name("incognito") .long("incognito") .short("i") @@ -104,7 +110,8 @@ impl<'a: 'b, 'b> Handler<'a> { .alias("priv") .global(true) .help("Don't update local history for actions"), - ).subcommand(CmdHistory::build()); + ) + .subcommand(CmdHistory::build()); // Disable color usage if compiled without color support #[cfg(feature = "no-color")] diff --git a/src/cmd/subcmd/upload.rs b/src/cmd/subcmd/upload.rs index 27b3084..4f6974c 100644 --- a/src/cmd/subcmd/upload.rs +++ b/src/cmd/subcmd/upload.rs @@ -19,7 +19,8 @@ impl CmdUpload { .help("The file to upload") .required(true) .multiple(false), - ).arg(ArgPassword::build().help("Protect the file with a password")) + ) + .arg(ArgPassword::build().help("Protect the file with a password")) .arg(ArgGenPassphrase::build()) .arg(ArgDownloadLimit::build().default_value(DOWNLOAD_DEFAULT)) .arg(ArgHost::build()) @@ -31,7 +32,8 @@ impl CmdUpload { .alias("f") .value_name("NAME") .help("Rename the file being uploaded"), - ).arg( + ) + .arg( Arg::with_name("open") .long("open") .short("o") diff --git a/src/util.rs b/src/util.rs index c8d2c81..bbd51ee 100644 --- a/src/util.rs +++ b/src/util.rs @@ -55,7 +55,8 @@ pub fn print_error(err: impl Borrow) { } else { eprintln!("{} {}", highlight_error("caused by:"), err); } - }).count(); + }) + .count(); // Fall back to a basic message if count == 0 {