From 00c7aacf013d97d1dfca2bafcd6592c1e06c4077 Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Tue, 3 Dec 2024 21:26:18 -0600 Subject: [PATCH] clippy for windows --- bin/src/commands/photoshoot/mod.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/src/commands/photoshoot/mod.rs b/bin/src/commands/photoshoot/mod.rs index 0bbbbc2d..5316084d 100644 --- a/bin/src/commands/photoshoot/mod.rs +++ b/bin/src/commands/photoshoot/mod.rs @@ -41,12 +41,15 @@ pub struct Command { } #[allow(clippy::too_many_lines)] +/// Execute the photoshoot command +/// +/// # Errors +/// [`Error::Io`] if an IO error occurs in the Arma controller pub fn execute(cmd: &Command) -> Result { - // Warn the user this is experimental, ask them to confirm if !dialoguer::Confirm::new() .with_prompt("This feature is experimental, are you sure you want to continue?") .interact() - .unwrap() + .unwrap_or_default() { return Ok(Report::new()); } @@ -75,9 +78,9 @@ pub fn execute(cmd: &Command) -> Result { let config = ProjectConfig::from_file(&Path::new(".hemtt").join("project.toml"))?; let launch = if config.hemtt().launch().contains_key("photoshoot") { - read_config(&config, &[String::from("photoshoot")], &mut report)? + read_config(&config, &[String::from("photoshoot")], &mut report) } else { - read_config(&config, &[], &mut report)? + read_config(&config, &[], &mut report) }; let Some(launch) = launch else { return Ok(report); @@ -126,6 +129,7 @@ pub struct Photoshoot { } impl Photoshoot { + #[must_use] pub fn new(command: PathBuf, from: PathBuf) -> Self { Self { command,