Skip to content

Commit 5e3a213

Browse files
committed
WIP (Try wrapping "outer" data in tuples)
1 parent 4b2dba7 commit 5e3a213

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msgpax/unpacker.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ defmodule Msgpax.Unpacker do
133133
options = Macro.var(:options, nil)
134134
outer = Macro.var(:outer, nil)
135135
defp unpack_collection(<<unquote_splicing(format), rest::bits>>, result, options, outer, index, length, kind) when index < length do
136-
outer = [kind, index, length | outer]
136+
outer = [{kind, index, length} | outer]
137137
unquote(pipe(rest, pipe(result, pipe(options, pipe(outer, call, 0), 0), 0), 0))
138138
end
139139
end
@@ -167,7 +167,7 @@ defmodule Msgpax.Unpacker do
167167
Msgpax.Ext.new(type, data)
168168
end
169169

170-
defp unpack_continue(<<buffer::bits>>, result, options, [kind, index, length | outer]) do
170+
defp unpack_continue(<<buffer::bits>>, result, options, [{kind, index, length} | outer]) do
171171
unpack_collection(buffer, result, options, outer, index + 1, length, kind)
172172
end
173173

0 commit comments

Comments
 (0)