Reposition freeze-to-stream! fn for clarity

This commit is contained in:
Peter Taoussanis 2013-10-24 12:39:11 +07:00
parent 7c4a69893f
commit a122e62fe0

View file

@ -97,11 +97,6 @@
(freeze-to-stream* m# s#))
(freeze-to-stream* x# s#)))
(defn freeze-to-stream!
"Low-level API. Serializes arg (any Clojure data type) to a DataOutputStream."
[^DataOutputStream data-output-stream x & _]
(freeze-to-stream data-output-stream x))
(defmacro ^:private freezer [type id & body]
`(extend-type ~type
Freezable
@ -195,6 +190,11 @@
(declare assert-legacy-args)
(defn freeze-to-stream!
"Low-level API. Serializes arg (any Clojure data type) to a DataOutputStream."
[^DataOutputStream data-output-stream x & _]
(freeze-to-stream data-output-stream x))
(defn freeze
"Serializes arg (any Clojure data type) to a byte array. Set :legacy-mode to
true to produce bytes readable by Nippy < 2.x. For custom types extend the