diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2011-01-16 19:03:47 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-01-16 19:03:47 +0000 |
| commit | f47817d6174e924c7d31ba26d4e67055cffa80b1 (patch) | |
| tree | 0873b8eeeb9c96cdb0a7c6606fd2bb4c51a28bc9 /src | |
| parent | c0d3ab81e6f721a1e41f9c94893f87e0efe05e49 (diff) | |
| download | rabbitmq-server-git-f47817d6174e924c7d31ba26d4e67055cffa80b1.tar.gz | |
cosmetic: get rid of intermediate var and save some space
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_msg_store_gc.erl | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/rabbit_msg_store_gc.erl b/src/rabbit_msg_store_gc.erl index 68bf43380e..428f8b10e8 100644 --- a/src/rabbit_msg_store_gc.erl +++ b/src/rabbit_msg_store_gc.erl @@ -137,14 +137,13 @@ attempt_action(Action, Files, msg_store_state = MsgStoreState }) -> case [File || File <- Files, rabbit_msg_store:has_readers(File, MsgStoreState)] of - [] -> - Thunks1 = lists:filter( - fun (Thunk) -> not Thunk() end, - [do_action(Action, Files, MsgStoreState) | Thunks]), - State #state { on_action = Thunks1 }; - [File | _] -> - Pending1 = dict:store(File, {Action, Files}, Pending), - State #state { pending_no_readers = Pending1 } + [] -> State #state { + on_action = lists:filter( + fun (Thunk) -> not Thunk() end, + [do_action(Action, Files, MsgStoreState) | + Thunks]) }; + [File | _] -> Pending1 = dict:store(File, {Action, Files}, Pending), + State #state { pending_no_readers = Pending1 } end. do_action(combine, [Source, Destination], MsgStoreState) -> |
