Skip to content

Commit

Permalink
run mix format again
Browse files Browse the repository at this point in the history
  • Loading branch information
tessi committed Jan 15, 2020
1 parent f8624ff commit 2d5e82d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
</p>

<p align="center">
<a href="https://spectrum.chat/wasmer">
<img src="https://withspectrum.github.io/badge/badge.svg" alt="Join the Wasmer Community">
</a>
<a href="https://github.com/wasmerio/wasmer/blob/master/LICENSE">
<a href="https://github.com/tessi/wasmex/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/wasmerio/wasmer.svg" alt="License">
</a>
</p>
Expand Down
3 changes: 2 additions & 1 deletion lib/wasmex/instance.ex
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ defmodule Wasmex.Instance do
Wasmex.Native.instance_call_exported_function(resource, name, params)
end

@spec memory(__MODULE__.t(), atom(), pos_integer()) :: {:error, binary()} | {:ok, Wasmex.Memory.t()}
@spec memory(__MODULE__.t(), atom(), pos_integer()) ::
{:error, binary()} | {:ok, Wasmex.Memory.t()}
def memory(%__MODULE__{} = instance, size, offset)
when size in [:uint8, :int8, :uint16, :int16, :uint32, :int32] do
Wasmex.Memory.from_instance(instance, size, offset)
Expand Down
6 changes: 4 additions & 2 deletions lib/wasmex/memory.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ defmodule Wasmex.Memory do
from_instance(instance, :uint8, 0)
end

@spec from_instance(Wasmex.Instance.t(), atom(), non_neg_integer()) :: {:error, binary()} | {:ok, __MODULE__.t()}
@spec from_instance(Wasmex.Instance.t(), atom(), non_neg_integer()) ::
{:error, binary()} | {:ok, __MODULE__.t()}
def from_instance(%Wasmex.Instance{resource: resource}, size, offset)
when size in [:uint8, :int8, :uint16, :int16, :uint32, :int32] do
case Wasmex.Native.memory_from_instance(resource) do
Expand Down Expand Up @@ -185,7 +186,8 @@ defmodule Wasmex.Memory do
write_binary(memory, memory.size, memory.offset, index, str)
end

@spec write_binary(__MODULE__.t(), atom(), non_neg_integer(), non_neg_integer(), binary()) :: :ok
@spec write_binary(__MODULE__.t(), atom(), non_neg_integer(), non_neg_integer(), binary()) ::
:ok
def write_binary(%Wasmex.Memory{resource: resource}, size, offset, index, str)
when is_binary(str) do
# strings a null-byte terminated in C-land
Expand Down

0 comments on commit 2d5e82d

Please sign in to comment.