diff --git a/CHANGELOG.md b/CHANGELOG.md index da87131..b0d840b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.3 + +- Fixed .cons with maps in sequences of entries using the key as the value! + ## 0.1.2 - Fixed .cons with map entries in clj using the key as the value! diff --git a/README.md b/README.md index 3c4d8b4..86eec53 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ indexed-vector ## Latest version -lein `[com.wotbrew/idx "0.1.2"]` or deps `com.wotbrew/idx {:mvn/version "0.1.2"}`. +lein `[com.wotbrew/idx "0.1.3"]` or deps `com.wotbrew/idx {:mvn/version "0.1.3"}`. ## Features diff --git a/pom.xml b/pom.xml index 3475b68..65ccc3f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.wotbrew idx - 0.1.2 + 0.1.3 idx diff --git a/src/com/wotbrew/idx/impl/map.clj b/src/com/wotbrew/idx/impl/map.clj index 098d684..412fa9a 100644 --- a/src/com/wotbrew/idx/impl/map.clj +++ b/src/com/wotbrew/idx/impl/map.clj @@ -149,7 +149,7 @@ :else (reduce (fn [^IPersistentMap this ^Map$Entry e] - (.assoc this (.getKey e) (.getKey e))) + (.assoc this (.getKey e) (.getValue e))) this o))) (empty [this] (IndexedPersistentMap. (.empty ^IPersistentCollection m) nil nil nil auto)) diff --git a/test/com/wotbrew/idx_test.cljc b/test/com/wotbrew/idx_test.cljc index c7867a9..a96c267 100644 --- a/test/com/wotbrew/idx_test.cljc +++ b/test/com/wotbrew/idx_test.cljc @@ -128,6 +128,9 @@ (deftest conj-on-map-entry-test (is (= {42 43} (conj (auto {}) (first {42 43}))))) +(deftest conj-on-seq-of-entries-test + (is (= {42 43, 43 45} (conj (auto {}) (seq {42 43, 43 45}))))) + ;; properties (def index-pair