Skip to content

Commit

Permalink
Fix -spec issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rustkas committed Jun 10, 2022
1 parent f6d25b3 commit a1909bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/eiconv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ close(_Cd) ->
-spec convert(FromEncoding, Input) -> Result when
FromEncoding :: string(),
Input :: string(),
Result :: {ok, binary()}.
Result :: {ok, binary()} | {error, Error},
Error :: term().
convert(FromEncoding, Input) ->
convert(FromEncoding, "utf-8", Input).

Expand All @@ -134,7 +135,8 @@ convert(FromEncoding, Input) ->
FromEncoding :: string(),
ToEncoding :: string(),
Input :: string(),
Result :: {ok, binary()}.
Result :: {ok, binary()} | {error, Error},
Error :: term().
convert(FromEncoding, ToEncoding, Input) ->
case open(ToEncoding, FromEncoding) of
{ok, Cd} ->
Expand Down

0 comments on commit a1909bf

Please sign in to comment.