diff --git a/wayshot/src/cli.rs b/wayshot/src/cli.rs index 0ad61c23..9882e09d 100644 --- a/wayshot/src/cli.rs +++ b/wayshot/src/cli.rs @@ -29,7 +29,7 @@ pub struct Cli { /// Arguments to call slurp with for selecting a region #[arg(short, long, value_name = "SLURP_ARGS")] - pub slurp: Option, + pub slurp: Option>, /// Enable cursor in screenshots #[arg(short, long)] diff --git a/wayshot/src/wayshot.rs b/wayshot/src/wayshot.rs index 2d25e098..aac8f77c 100644 --- a/wayshot/src/wayshot.rs +++ b/wayshot/src/wayshot.rs @@ -66,8 +66,8 @@ fn main() -> Result<()> { return Ok(()); } - let image_buffer = if let Some(slurp_region) = cli.slurp { - let slurp_region = slurp_region.clone(); + let image_buffer = if let Some(slurp_args) = cli.slurp { + let slurp_region = slurp_args.unwrap_or("".to_string()); wayshot_conn.screenshot_freeze( Box::new(move || { || -> Result {