From fdde5bf1b0779aba1b9cc6b8952884b3f28b789d Mon Sep 17 00:00:00 2001 From: Evy Garden Date: Tue, 17 Oct 2023 21:20:16 +0200 Subject: [PATCH] cargo clippy --- src/freedesktop.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/freedesktop.rs b/src/freedesktop.rs index 2b76bbd..1031d3f 100644 --- a/src/freedesktop.rs +++ b/src/freedesktop.rs @@ -36,8 +36,8 @@ impl TrashContext { full_paths .iter() - .map(|path| { - let topdir = get_topdir_for_path(&path, &mount_points); + .try_for_each(|path| { + let topdir = get_topdir_for_path(path, &mount_points); if topdir == home_topdir { if path.starts_with(home_trash.as_path()) { @@ -54,8 +54,7 @@ impl TrashContext { } Ok(()) - }) - .collect::>()?; + })?; for path in full_paths { debug!("Deleting {:?}", path);