From 99fa8aaaa7956178973150a03ce4954ab17a197b Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Wed, 11 Dec 2024 17:21:34 +0100 Subject: [PATCH] Really hide install() from clippy --- src/bin/fish.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/bin/fish.rs b/src/bin/fish.rs index 4d1ff2f34..c6be9055b 100644 --- a/src/bin/fish.rs +++ b/src/bin/fish.rs @@ -78,12 +78,9 @@ const SYSCONF_DIR: &str = env!("SYSCONFDIR"); const BIN_DIR: &str = env!("BINDIR"); #[cfg(feature = "installable")] -#[allow(unused_variables)] -#[allow(unreachable_code)] +// Disable for clippy because otherwise it would require sphinx +#[cfg(not(clippy))] fn install(confirm: bool) { - // Disable for clippy because otherwise it would require sphinx - #[cfg(clippy)] - return; use rust_embed::RustEmbed; #[derive(RustEmbed)] @@ -199,7 +196,7 @@ fn install(confirm: bool) { std::process::exit(0); } -#[cfg(not(feature = "installable"))] +#[cfg(any(clippy, not(feature = "installable")))] fn install(_confirm: bool) { eprintln!("Fish was built without support for self-installation"); std::process::exit(1);