Merge pull request #3 from linusdm/int32_specifier_warning

Avoid compile-time warnings
This commit is contained in:
Martin Frost 2023-07-17 20:25:11 +02:00 committed by GitHub
commit 841444b325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -49,20 +49,20 @@ defmodule ISN do
def encode(_opts) do
quote do
thing ->
[<<IO.iodata_length(thing)::int32>> | thing]
[<<IO.iodata_length(thing)::int32()>> | thing]
end
end
def decode(:copy) do
quote do
<<len::int32, thing::binary-size(len)>> ->
<<len::int32(), thing::binary-size(len)>> ->
:binary.copy(thing)
end
end
def decode(:reference) do
quote do
<<len::int32, thing::binary-size(len)>> ->
<<len::int32(), thing::binary-size(len)>> ->
thing
end
end