From a9c7696ecc09e3f0cf00b95d3acc9416c67df0f3 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 1 Jan 2020 11:17:16 +0100 Subject: [PATCH] Small stylistic change --- src/app.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app.rs b/src/app.rs index 9921487..7b2df57 100644 --- a/src/app.rs +++ b/src/app.rs @@ -37,7 +37,7 @@ pub fn build_app() -> App<'static, 'static> { .long_help(helps[name].long) }; - let app = App::new("fd") + let mut app = App::new("fd") .version(crate_version!()) .usage("fd [FLAGS/OPTIONS] [] [...]") .setting(AppSettings::ColoredHelp) @@ -287,16 +287,15 @@ pub fn build_app() -> App<'static, 'static> { // Make `--one-file-system` available only on Unix and Windows platforms, as per the // restrictions on the corresponding option in the `ignore` crate. // Provide aliases `mount` and `xdev` for people coming from `find`. - // It's not pretty, but I'm unaware of a way to make just part of a builder chain conditional if cfg!(any(unix, windows)) { - app.arg( + app = app.arg( arg("one-file-system") .long("one-file-system") .aliases(&["mount", "xdev"]), - ) - } else { - app + ); } + + app } #[rustfmt::skip]