Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jul 1, 2024
1 parent 9e07d93 commit 6034628
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/turbo-tasks-memory/src/edges_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ impl EdgesDataEntry {
}
}

/// Removes the entry from the set, returning `true` if the entry was
/// present. When the entry was removed, `self` might become `Empty` and
/// must be removed.
fn remove(&mut self, entry: EdgeEntry) -> bool {
if !self.has(entry) {
return false;
Expand Down Expand Up @@ -350,6 +353,8 @@ impl EdgesDataEntry {
}
}

/// Simplifies the set by converting it to a more compact representation.
/// When `self` becomes `Empty`, it must be removed.
fn simplify(&mut self) {
if let EdgesDataEntry::Complex(set) = self {
match set.len() {
Expand Down

0 comments on commit 6034628

Please sign in to comment.