3fafff8

Bowmap · bowmap.git · Tickets

Branches > main > 3fafff8 > files

Rename 'to-reader' and 'to-writer' to '->reader' and '->writer'

Grahp, 2026-09-15

Commit: 3fafff83135cc1585f3335cd8c85dd5d008eeaef
Parent: 25bc420

4 changed files:

src/net/bowmap/server/protocol/clientbound_packets.clj modified (view file)

@@ -183,6 +183,6 @@ (def phase->id->numeric-id (update-vals clientbound-packets #(zipmap (take-nth 2 %) (range)))) (def phase->id->writer (update-vals clientbound-packets #(-> (apply hash-map %)                                                              some-vals-                                                             (update-vals to-writer))))+                                                             (update-vals ->writer))))  (def ids (set (mapcat #(take-nth 2 %) (vals clientbound-packets))))

src/net/bowmap/server/protocol/readers.clj modified (view file)

@@ -51,7 +51,7 @@               (assoc-some acc field (reader buf)))             {} (partition 2 table)))) -(defn to-reader+(defn ->reader   "Attempts to coerces 'x' into a reader. Throws if it cannot.    Vectors with pairs of [:key reader] are turned into tables readers.    Nil is coerced to the empty table reader."

src/net/bowmap/server/protocol/serverbound_packets.clj modified (view file)

@@ -104,6 +104,6 @@  (def phase->numeric-id->id (update-vals serverbound-packets #(zipmap (range) (take-nth 2 %)))) (def phase->id->reader (update-vals serverbound-packets #(-> (apply hash-map %)-                                                             (update-vals to-reader))))+                                                             (update-vals ->reader))))  (def ids (set (mapcat #(take-nth 2 %) (vals serverbound-packets))))

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

@@ -58,7 +58,7 @@               (writer acc (get m field)))             buf (partition 2 table)))) -(defn to-writer+(defn ->writer   "Attempts to coerces 'x' into a writer. Throws if it cannot.    Vectors with pairs of [:key writer] are turned into tables writers.    Nil is not a valid writer."