Skip to content

Commit

Permalink
chore: fix bindata warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Jul 17, 2024
1 parent 1730cf5 commit 76b6c79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mqtt
version: 1.2.2
version: 1.2.3

authors:
- Stephen von Takach <steve@vontaka.ch>
Expand Down
4 changes: 2 additions & 2 deletions src/mqtt.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ module MQTT
DEFAULT_SSL_PORT = 8883

macro string(name, onlyif = nil, default = nil, &block)
uint16 :{{name.id}}_size, value: ->{ {{name.id}}.bytesize }, onlyif: {{onlyif}}
string :{{name.id}}, length: ->{ {{name.id}}_size }, onlyif: {{onlyif}}, default: {{default}}
field {{name.id}}_size : UInt16, value: ->{ {{name.id}}.bytesize }, onlyif: {{onlyif}}
field {{name.id}} : String = {{default}}, length: ->{ {{name.id}}_size }, onlyif: {{onlyif}}

{% if block %}
def {{name.id}}=(str : String)
Expand Down

0 comments on commit 76b6c79

Please sign in to comment.