Skip to content

Commit

Permalink
Rename Element -> _Element
Browse files Browse the repository at this point in the history
  • Loading branch information
AquaGeek committed Oct 28, 2021
1 parent 5f4b97e commit c024a77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/PriorityQueueModule/PriorityQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public struct PriorityQueue<Value, Priority: Comparable> {
public typealias Pair = (value: Value, priority: Priority)

@usableFromInline
struct Element: Comparable {
struct _Element: Comparable {
@usableFromInline let value: Value
let priority: Priority
let insertionCounter: UInt64
Expand Down Expand Up @@ -46,7 +46,7 @@ public struct PriorityQueue<Value, Priority: Comparable> {
}

@usableFromInline
internal var _base: Heap<Element>
internal var _base: Heap<_Element>

@usableFromInline
internal var _insertionCounter: UInt64 = 0
Expand Down Expand Up @@ -82,7 +82,7 @@ public struct PriorityQueue<Value, Priority: Comparable> {
public mutating func insert(_ value: Value, priority: Priority) {
defer { _insertionCounter += 1 }

let pair = Element(
let pair = _Element(
value: value,
priority: priority,
insertionCounter: _insertionCounter
Expand Down Expand Up @@ -156,7 +156,7 @@ extension PriorityQueue {
elements
.enumerated()
.map({
Element(
_Element(
value: $0.element.value,
priority: $0.element.priority,
insertionCounter: UInt64($0.offset)
Expand Down

0 comments on commit c024a77

Please sign in to comment.