Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

windows: Remove unnecessay helper function (#30764)

张小白4b7b5db58c7a
diff --git a/crates/gpui/src/platform/windows/destination_list.rs b/crates/gpui/src/platform/windows/destination_list.rs
index 09b47a3ea43..da4c7d1ab42 100644
--- a/crates/gpui/src/platform/windows/destination_list.rs
+++ b/crates/gpui/src/platform/windows/destination_list.rs
@@ -137,10 +137,7 @@ fn add_recent_folders(
let tasks: IObjectCollection =
CoCreateInstance(&EnumerableObjectCollection, None, CLSCTX_INPROC_SERVER)?;
- for folder_path in entries
- .iter()
- .filter(|path| !is_item_in_array(path, removed))
- {
+ for folder_path in entries.iter().filter(|path| !removed.contains(path)) {
let argument = HSTRING::from(
folder_path
.iter()
@@ -181,11 +178,6 @@ fn add_recent_folders(
}
}
-#[inline]
-fn is_item_in_array(item: &SmallVec<[PathBuf; 2]>, removed: &Vec<SmallVec<[PathBuf; 2]>>) -> bool {
- removed.iter().any(|removed_item| removed_item == item)
-}
-
fn create_shell_link(
argument: HSTRING,
description: HSTRING,