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:
parent
d92166f9f6
commit
9260abafba
2 changed files with 12 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue