diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2010-10-08 15:54:44 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-10-08 15:54:44 +0100 |
| commit | ad63b5fb665beeab548b78acbffb3a0f38eb94e1 (patch) | |
| tree | f0d7f6c9b9aa95c7e916106dc04591db89992844 /src | |
| parent | 344ff36538961f0af466b2f2d28449bc0333f3c5 (diff) | |
| download | rabbitmq-server-git-ad63b5fb665beeab548b78acbffb3a0f38eb94e1.tar.gz | |
Gratuitous refactoring
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_binding.erl | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index a0389a5286..61a3b7f502 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -331,14 +331,12 @@ remove_for_destination(DstName, FwdDeleteFun) -> end, Grouped) end. -post_binding_removal(IsDeleted, Src = #exchange{ type = Type }, Bs) -> - Module = type_to_module(Type), - case IsDeleted of - {auto_deleted, Fun} -> ok = Module:delete(Src, Bs), - Fun(), - ok; - not_deleted -> ok = Module:remove_bindings(Src, Bs) - end. +post_binding_removal(not_deleted, Src = #exchange{ type = Type }, Bs) -> + ok = type_to_module(Type):remove_bindings(Src, Bs); +post_binding_removal({auto_deleted, Fun}, Src = #exchange{ type = Type }, Bs) -> + ok = type_to_module(Type):delete(Src, Bs), + Fun(), + ok. %% Requires that its input binding list is sorted in exchange-name %% order, so that the grouping of bindings (for passing to |
