Use HashMap<ProjectEntryId, Entry> instead of HashSet<Entry> in outline_panel (#20780)

Came across this because I noticed that `Entry` implements `Hash`, which
was surprising to me. I believe that `ProjectEntryId` should be unique
and so it seems better to dedupe based on this.

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2024-11-18 05:38:31 -07:00 committed by GitHub
parent d92166f9f6
commit 9260abafba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 8 deletions

View file

@ -3344,7 +3344,7 @@ impl File {
}
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Entry {
pub id: ProjectEntryId,
pub kind: EntryKind,
@ -3376,7 +3376,7 @@ pub struct Entry {
pub is_fifo: bool,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EntryKind {
UnloadedDir,
PendingDir,