From 2666011330fec7ee4d280aaa141860ebda47b53d Mon Sep 17 00:00:00 2001 From: "Sergey A." Date: Thu, 7 Mar 2024 14:43:43 +0300 Subject: [PATCH] refactor: remove unnecessary to_string() --- wayshot/src/wayshot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wayshot/src/wayshot.rs b/wayshot/src/wayshot.rs index 37152a79..2b037c2a 100644 --- a/wayshot/src/wayshot.rs +++ b/wayshot/src/wayshot.rs @@ -98,9 +98,9 @@ fn main() -> Result<()> { } } else if cli.choose_output { let outputs = wayshot_conn.get_all_outputs(); - let output_names: Vec = outputs + let output_names: Vec<&str> = outputs .iter() - .map(|display| display.name.to_string()) + .map(|display| display.name.as_str()) .collect(); if let Some(index) = select_ouput(&output_names) { wayshot_conn.screenshot_single_output(&outputs[index], cli.cursor)?