diff --git a/src/DataStructures.jl b/src/DataStructures.jl index 5c6438bd6..5e5d767ec 100644 --- a/src/DataStructures.jl +++ b/src/DataStructures.jl @@ -5,14 +5,8 @@ module DataStructures isbitsunion, isiterable, dict_with_eltype, KeySet, Callable, _tablesz, findnextnot, unsafe_getindex, unsafe_setindex!, peek - - import Base.insert! - # Exports for old version of julia where Base doesn't export this - export peek - export popat! - using Compat # Provides Base.Order.ReverseOrdering(). May remove this line with julia 1.4 using OrderedCollections using OrderedCollections: isordered export OrderedDict, OrderedSet, LittleDict @@ -36,12 +30,11 @@ module DataStructures export Trie, subtrie, keys_with_prefix, partial_path, find_prefixes - export LinkedList, Nil, Cons, nil, cons, head, tail, list, filter, cat, - reverse + export LinkedList, Nil, Cons, nil, cons, head, tail, list export MutableLinkedList export SortedDict, SortedMultiDict, SortedSet - export SDToken, SDSemiToken, SMDToken, SMDSemiToken - export SetToken, SetSemiToken + export SMDSemiToken, SMDToken + export SetSemiToken export pastendsemitoken, beforestartsemitoken export pastendtoken, beforestarttoken export searchsortedafter, searchequalrange diff --git a/src/priorityqueue.jl b/src/priorityqueue.jl index 2f2a3f4b9..e0aac2f3d 100644 --- a/src/priorityqueue.jl +++ b/src/priorityqueue.jl @@ -323,11 +323,7 @@ function Base.popfirst!(pq::PriorityQueue) return x end -if isdefined(Base, :popat!) # We will overload if it is defined, else we define on our own - import Base: popat! -end - -function popat!(pq::PriorityQueue, key) +function Base.popat!(pq::PriorityQueue, key) idx = pq.index[key] force_up!(pq, idx) popfirst!(pq)