diff --git a/src/heaps/binary_heap.jl b/src/heaps/binary_heap.jl index d39b5f58..6ca070cc 100644 --- a/src/heaps/binary_heap.jl +++ b/src/heaps/binary_heap.jl @@ -31,8 +31,8 @@ struct FasterReverse <: Base.Ordering end Base.lt(o::FasterReverse, a, b) = a > b mutable struct BinaryHeap{T, O <: Base.Ordering} <: AbstractHeap{T} - ordering::O - valtree::Vector{T} + const ordering::O + const valtree::Vector{T} function BinaryHeap{T}(ordering::Base.Ordering) where T new{T, typeof(ordering)}(ordering, Vector{T}())