diff --git a/CHANGELOG.md b/CHANGELOG.md index ced2c1a..c7493ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +* Remove use of `resolve` in ordered-set. [#71](https://github.com/clj-commons/ordered/issues/71) + ## 1.15.12 - 2024-05-13 -* Fix NPE when hashing ordered-set that contain `nil`. +* Fix NPE when hashing ordered-set that contain `nil`. [#73](https://github.com/clj-commons/ordered/issues/73) ## 1.15.11 - 2023-03-26 diff --git a/src/flatland/ordered/set.clj b/src/flatland/ordered/set.clj index 0257069..6b3bb04 100644 --- a/src/flatland/ordered/set.clj +++ b/src/flatland/ordered/set.clj @@ -9,13 +9,6 @@ (declare transient-ordered-set) -;; We could use compile-if technique here, but hoping to avoid -;; an AOT issue using this way instead. -(def hasheq-ordered-set - (or (resolve 'clojure.core/hash-unordered-coll) - (fn old-hasheq-ordered-set [^Seqable s] - (reduce + (map hash (.seq s)))))) - (deftype OrderedSet [^clojure.lang.IPersistentMap k->i ^clojure.lang.IPersistentVector i->k] IPersistentSet @@ -66,7 +59,7 @@ IHashEq (hasheq [this] - (hasheq-ordered-set this)) + (hash-unordered-coll this)) Set (iterator [this]