From b15c6fdf349d13ef571e49870f10976fb43fabeb Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Fri, 14 Jun 2024 22:55:31 -0400 Subject: [PATCH] `prompt`: tweak conditional compilation so as not to trigger `unused_mut` lint on Windows and Linux thanks to @rzmk's PR - $1879 --- src/cmd/prompt.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/cmd/prompt.rs b/src/cmd/prompt.rs index c565050f0..88b862da5 100644 --- a/src/cmd/prompt.rs +++ b/src/cmd/prompt.rs @@ -159,15 +159,19 @@ pub fn run(argv: &[&str]) -> CliResult<()> { let title = args .flag_msg .unwrap_or_else(|| DEFAULT_OUTPUT_TITLE.to_owned()); - let mut fd = FileDialog::new() + + #[cfg(not(target_os = "macos"))] + let fd = FileDialog::new() .set_directory(args.flag_workdir) .set_title(title) .set_file_name(args.flag_save_fname); #[cfg(target_os = "macos")] - { - fd = fd.set_can_create_directories(true); - } + let fd = FileDialog::new() + .set_directory(args.flag_workdir) + .set_title(title) + .set_file_name(args.flag_save_fname) + .set_can_create_directories(true); // no delay here, we want the save dialog to appear immediately // the delay is only for input dialogs, so they pop over in reverse order