-module(apollo@util). -compile([no_auto_import, nowarn_unused_vars]). -export([to_err/2]). -export_type([any_type/0]). -type any_type() :: {int_t, integer()} | {string_t, binary()} | {float_t, float()} | {bool_t, boolean()}. -spec to_err(boolean(), binary()) -> {ok, nil} | {error, binary()}. to_err(B, Err) -> case B of true -> {ok, nil}; false -> {error, Err} end.