latest

Branches > main > latest > files / src

Update enum-> docstring

Grahp, 2026-09-01

Commit: 495549aed8b8ea321efcce458a8ebb5c6c830b4b
Parent: 93fc876

1 changed file:

src/net/bowmap/transport/writers.clj modified (view file)

@@ -205,10 +205,10 @@     (let [x (if (nil? x) default x)]       (writer buf x)))) -;; TODO what actually happens when the value is nil? (defn enum->-  "Writes an enum with writer 't', and a map 'm', which maps encoded values to values, so it is 'backwards'.-   For instance, the map {1 :foo} will write :foo as 1."+  "Returns a writer for an enum of 'writer' with the values in 'm'.+   'm' is a map of encoded values to packet values, same as the enum reader.+   For example, the map {1 :foo} will write :foo as 1, so the map is 'backwards'."   [writer m]   (let [m (set/map-invert (t/as-map m))]     (fn [buf x]