From 961eb417d1312fce53c8c1f0276d92eadb5c7ff8 Mon Sep 17 00:00:00 2001 From: Per Gustafsson Date: Mon, 15 Jul 2024 14:26:22 +0200 Subject: [PATCH] fix: extra maybes --- src/s2_loop.erl | 2 +- src/s2_procs.erl | 2 +- src/s2_sh.erl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/s2_loop.erl b/src/s2_loop.erl index 71edeb0..58b1638 100644 --- a/src/s2_loop.erl +++ b/src/s2_loop.erl @@ -56,7 +56,7 @@ for_test() -> -endif. --spec retry(fun()) -> maybe(_, _). +-spec retry(fun()) -> 'maybe'(_, _). %% @doc Call F every T milliseconds until it returns ok. %% Abort after N retries unless N is infinity. %% Note that F is called at least once. diff --git a/src/s2_procs.erl b/src/s2_procs.erl index ec6c542..edb1486 100644 --- a/src/s2_procs.erl +++ b/src/s2_procs.erl @@ -154,7 +154,7 @@ send(Proc, Msg0) -> {'EXIT', {badarg, _}} -> {error, no_such_process} end. --spec recv(proc()) -> maybe(_, _). +-spec recv(proc()) -> 'maybe'(_, _). %% @doc recv(Proc) is the next message received from Proc. recv(Proc) -> recv(Proc, infinity). diff --git a/src/s2_sh.erl b/src/s2_sh.erl index 1f6e219..49ef668 100644 --- a/src/s2_sh.erl +++ b/src/s2_sh.erl @@ -193,7 +193,7 @@ temp_name_test() -> "/tmp/prefix" ++ N = temp_name("/tmp", "prefix"), eval(Fmt, Args) -> eval(lists:flatten(io_lib:format(Fmt, Args))). --spec eval(string()) -> maybe(string(), {non_neg_integer(), string()}). +-spec eval(string()) -> 'maybe'(string(), {non_neg_integer(), string()}). eval(Cmd) -> s2_fs:with_temp_file(fun(F) -> S0 = os:cmd(io_lib:format("~s > ~s 2>&1; echo $?", [Cmd, F])),