Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenesvk committed Dec 4, 2024
1 parent d43f5fc commit 81b7f8f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ fn delete_using_finder<P: AsRef<Path> + std::fmt::Debug>(full_paths: &[P]) -> Re
// osascript -e 'tell application "Finder" to delete { POSIX file "file1", POSIX "file2" }'
// The `-e` flag is used to execute only one line of AppleScript.
let mut command = Command::new("osascript");
let posix_files =
full_paths.into_iter().map(|p| format!("POSIX file {p:?}")).collect::<Vec<String>>().join(", ");
let posix_files = full_paths.into_iter().map(|p| format!("POSIX file {p:?}")).collect::<Vec<String>>().join(", ");

Check failure on line 108 in src/macos.rs

View workflow job for this annotation

GitHub Actions / build (macos)

this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
let script = format!("tell application \"Finder\" to delete {{ {posix_files} }}");

let argv: Vec<OsString> = vec!["-e".into(), script.into()];
Expand Down

0 comments on commit 81b7f8f

Please sign in to comment.