diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2014-02-06 19:21:36 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2014-02-06 19:21:36 +0000 |
| commit | 67dcf0dbd653e5da027ed124cbd9777c63f21f0c (patch) | |
| tree | 5acd00e8d3e7fe0b1a35a87a9cd3dae43f181a49 | |
| parent | 08dc3c58e8059df75c717bcd8577996f551d9db1 (diff) | |
| download | rabbitmq-server-git-67dcf0dbd653e5da027ed124cbd9777c63f21f0c.tar.gz | |
remove an abstraction too far
| -rw-r--r-- | src/rabbit_binding.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_misc.erl | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index 11e6bd38f6..bb9c61a8f6 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -169,7 +169,7 @@ add(Binding, InnerFun) -> ok -> case mnesia:read({rabbit_route, B}) of [] -> add(Src, Dst, B); - [_] -> fun rabbit_misc:const_ok/0 + [_] -> fun () -> ok end end; {error, _} = Err -> rabbit_misc:const(Err) diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index b10f79c5aa..848c4a8721 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -53,7 +53,7 @@ -export([parse_arguments/3]). -export([all_module_attributes/1, build_acyclic_graph/3]). -export([now_ms/0]). --export([const_ok/0, const/1]). +-export([const/1]). -export([ntoa/1, ntoab/1]). -export([is_process_alive/1]). -export([pget/2, pget/3, pget_or_die/2, pset/3]). @@ -218,7 +218,6 @@ {bad_edge, [digraph:vertex()]}), digraph:vertex(), digraph:vertex()})). -spec(now_ms/0 :: () -> non_neg_integer()). --spec(const_ok/0 :: () -> 'ok'). -spec(const/1 :: (A) -> thunk(A)). -spec(ntoa/1 :: (inet:ip_address()) -> string()). -spec(ntoab/1 :: (inet:ip_address()) -> string()). @@ -888,7 +887,6 @@ build_acyclic_graph(VertexFun, EdgeFun, Graph) -> {error, Reason} end. -const_ok() -> ok. const(X) -> fun () -> X end. %% Format IPv4-mapped IPv6 addresses as IPv4, since they're what we see |
