diff options
author | Tony Garnock-Jones <tonyg@kcbbs.gen.nz> | 2009-11-30 22:50:05 +0000 |
---|---|---|
committer | Tony Garnock-Jones <tonyg@kcbbs.gen.nz> | 2009-11-30 22:50:05 +0000 |
commit | 3842a84dd811717628119d172fec5b4ab1cd180f (patch) | |
tree | 7ee306d86e808fe9fcd5a2ed26b0e299a1571db2 | |
parent | bd4453bc6bca299f1f706951970b5f58a83003b8 (diff) | |
download | rabbitmq-server-3842a84dd811717628119d172fec5b4ab1cd180f.tar.gz |
Avoid compiler warning about unused term; weirdly, the replaced idiom works elsewhere
-rw-r--r-- | src/rabbit.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index b85af6ad..4d6bd009 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -389,5 +389,6 @@ discover_static_hooks(Hook) -> erlang:function_exported(M, Hook, 1)]. run_static_hooks(HookModules, Hook, Event) -> - _ = [{M, Hook, ok} = {M, Hook, M:Hook(Event)} || M <- HookModules], - ok. + ok = lists:foreach(fun (M) -> + {M, Hook, ok} = {M, Hook, M:Hook(Event)} + end, HookModules). |