From ab68cf1edae59980b6a013fc29684ef84cd5de94 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 13 May 2024 11:34:07 -0500 Subject: [PATCH] Update build.rs formatting a bit --- build.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.rs b/build.rs index 2c25ad5ee..c4d25d15e 100644 --- a/build.rs +++ b/build.rs @@ -16,8 +16,8 @@ fn main() { let default_build_dir = env::var("OUT_DIR").unwrap(); let build_dir = option_env!("FISH_BUILD_DIR").unwrap_or(&default_build_dir); rsconf::set_env_value("FISH_BUILD_DIR", build_dir); - // We need to canonicalize (i.e. realpath) - // the manifest dir because we want to compare it simply as a string at runtime. + // We need to canonicalize (i.e. realpath) the manifest dir because we want to be able to + // compare it directly as a string at runtime. rsconf::set_env_value( "CARGO_MANIFEST_DIR", std::fs::canonicalize(env!("CARGO_MANIFEST_DIR")) @@ -110,7 +110,7 @@ fn detect_bsd(_: &Target) -> Result> { if !target.chars().all(|c| c.is_ascii_lowercase()) { target = target.to_ascii_lowercase(); } - let result = target.ends_with("bsd") || target.ends_with("dragonfly"); + let is_bsd = target.ends_with("bsd") || target.ends_with("dragonfly"); #[cfg(any( target_os = "dragonfly", target_os = "freebsd", @@ -118,7 +118,7 @@ fn detect_bsd(_: &Target) -> Result> { target_os = "openbsd", ))] assert!(result, "Target incorrectly detected as not BSD!"); - Ok(result) + Ok(is_bsd) } /// Detect libintl/gettext and its needed symbols to enable internationalization/localization