From 8c795396ebb187cca19065bab9f8aa2ee17e3b0a Mon Sep 17 00:00:00 2001 From: lat9nq Date: Thu, 28 Jul 2022 16:47:42 -0400 Subject: [PATCH] installer: Use an inline expression for is_windows Co-authored-by: liushuyu --- src/installer.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/installer.rs b/src/installer.rs index 2861d3a..c2be519 100644 --- a/src/installer.rs +++ b/src/installer.rs @@ -454,10 +454,7 @@ impl InstallerFramework { is_launcher: false, burn_after_exit: false, launcher_path: None, - #[cfg(windows)] - is_windows: true, - #[cfg(not(windows))] - is_windows: false, + is_windows: cfg!(windows), } } @@ -485,10 +482,7 @@ impl InstallerFramework { is_launcher: false, burn_after_exit: false, launcher_path: None, - #[cfg(windows)] - is_windows: true, - #[cfg(not(windows))] - is_windows: false, + is_windows: cfg!(windows), }) } }