Shuffle some types
Put types in the modules they belong to instead of including them in each one from the header.
This commit is contained in:
@@ -7,15 +7,18 @@
|
||||
|
||||
-include("geef_records.hrl").
|
||||
|
||||
-type oid() :: #geef_oid{oid :: binary()}.
|
||||
-export_type([oid/0]).
|
||||
|
||||
-export([parse/1, hex/1]).
|
||||
|
||||
%% @doc Get a hex-encoded string of the hash
|
||||
-spec hex(geef_oid()) -> binary().
|
||||
-spec hex(geef_oid:oid()) -> binary().
|
||||
hex(#geef_oid{oid=Oid}) ->
|
||||
geef_nif:oid_fmt(Oid).
|
||||
|
||||
%% @doc Parse an iolist as a hash
|
||||
-spec parse(iolist() | binary()) -> geef_oid().
|
||||
-spec parse(iolist() | binary()) -> geef_oid:oid().
|
||||
parse(Sha) ->
|
||||
Oid = geef_nif:oid_parse(Sha),
|
||||
#geef_oid{oid=Oid}.
|
||||
|
||||
Reference in New Issue
Block a user