Skip to content

Commit cfdbdab

Browse files
codestorm1fhunleth
authored andcommitted
Added {:ok, {:partial, binary}} to the typespec for read/2
1 parent f3e1fe7 commit cfdbdab

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/circuits_uart.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ defmodule Circuits.UART do
296296
* `:ebadf` - the UART is closed
297297
* `:einval` - the UART is in active mode
298298
"""
299-
@spec read(GenServer.server(), non_neg_integer()) :: {:ok, binary} | {:error, File.posix()}
299+
@spec read(GenServer.server(), non_neg_integer()) ::
300+
{:ok, binary} | {:ok, {:partial, binary}} | {:error, File.posix()}
300301
def read(pid, timeout \\ 5000) do
301302
GenServer.call(pid, {:read, timeout}, genserver_timeout(timeout))
302303
end

0 commit comments

Comments
 (0)