Shorten cfg!() checks

This commit is contained in:
Simon Engmann 2019-12-30 22:27:45 +01:00 committed by David Peter
parent 6f7d10870c
commit ed6c184020

View file

@ -288,7 +288,7 @@ pub fn build_app() -> App<'static, 'static> {
// 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!(unix) || cfg!(windows) {
if cfg!(any(unix, windows)) {
app.arg(
arg("one-file-system")
.long("one-file-system")
@ -472,7 +472,7 @@ fn usage() -> HashMap<&'static str, Help> {
which are passed to fd via the positional <path> argument or the '--search-path' option \
will also be resolved relative to this directory.");
if cfg!(unix) || cfg!(windows) {
if cfg!(any(unix, windows)) {
doc!(h, "one-file-system"
, "Don't cross file system boundaries"
, "By default, fd will traverse the file system tree as far as other options dictate. \