Avoid compile-time warnings:
> bitstring specifier "int32" does not exist and is being expanded to "int32()"
This commit is contained in:
parent
c68b4128da
commit
e86e2452cf
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue