Skip to content

Commit

Permalink
[Heap] Mark removeMin/removeMax @discardableResult
Browse files Browse the repository at this point in the history
  • Loading branch information
lorentey committed Jan 30, 2024
1 parent 04aab35 commit a52457d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/HeapModule/Heap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ extension Heap {
///
/// - Complexity: O(log(`count`)) element comparisons
@inlinable
@discardableResult
public mutating func removeMin() -> Element {
return popMin()!
}
Expand All @@ -202,6 +203,7 @@ extension Heap {
///
/// - Complexity: O(log(`count`)) element comparisons
@inlinable
@discardableResult
public mutating func removeMax() -> Element {
return popMax()!
}
Expand Down

0 comments on commit a52457d

Please sign in to comment.