Skip to content

Commit

Permalink
Remove nul_terminated from Orb.Data
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalIcing committed Nov 10, 2024
1 parent a25df6f commit 664f848
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/orb/data.ex
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
defmodule Orb.Data do
@moduledoc false

# TODO: remove nul_terminated
defstruct [:offset, :value, nul_terminated: false]
defstruct [:offset, :value]

defimpl Orb.ToWat do
def to_wat(%Orb.Data{offset: offset, value: value, nul_terminated: nul_terminated}, indent) do
def to_wat(%Orb.Data{offset: offset, value: value}, indent) do
[
indent,
"(data (i32.const ",
Expand Down Expand Up @@ -40,7 +39,6 @@ defmodule Orb.Data do
end
|> then(&[?", &1, ?"])
end,
if(nul_terminated, do: ~S| "\00"|, else: []),
")\n"
]
end
Expand Down

0 comments on commit 664f848

Please sign in to comment.