96acb0b

Bowmap · bowmap.git · Tickets

Branches > main > 96acb0b > files

Fix optional> writer

Grahp, 2026-10-04

Commit: 96acb0b1a69b9e5b9334ca20926c887367715118
Parent: 5bc2073

1 changed file:

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

@@ -170,7 +170,11 @@   "Returns a writer that prefixes the value with a boolean indicating whether    it is present, and only writes the value via 'writer' if the value is non-nil."   [writer]-  (context-optional> (then> boolean> writer)))+  (let [writer (context-optional> writer)]+    (fn [buf x]+      (-> buf+        (boolean> (some? x))+        (writer x)))))  (def game-profile> (map> ::p/uuid uuid>                          ::p/username (string> 16)