diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2015-01-22 12:06:39 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2015-01-22 12:06:39 +0000 |
| commit | 358ccf68180357b4471ce06f87828b9f4d89a214 (patch) | |
| tree | e30d74bedee55a2aeea649af1e8325e3a2510e45 /src/truncate.erl | |
| parent | 86895beb9c059fd9a3f56cf2f014a64dc2c8c7aa (diff) | |
| parent | 9b833f66a6323566dc4a9e8e9395696e6a2c36b1 (diff) | |
| download | rabbitmq-server-git-358ccf68180357b4471ce06f87828b9f4d89a214.tar.gz | |
stable to default
Diffstat (limited to 'src/truncate.erl')
| -rw-r--r-- | src/truncate.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/truncate.erl b/src/truncate.erl index 820af1bf86..1b4d957d0b 100644 --- a/src/truncate.erl +++ b/src/truncate.erl @@ -45,7 +45,7 @@ report(List, Params) when is_list(List) -> [case Item of report(Other, Params) -> term(Other, Params). term(Thing, {Max, {Content, Struct, ContentDec, StructDec}}) -> - case term_limit(Thing, Max) of + case exceeds_size(Thing, Max) of true -> term(Thing, true, #params{content = Content, struct = Struct, content_dec = ContentDec, @@ -93,7 +93,7 @@ shrink_list([H|T], #params{content = Content, %% sizes. This is all going to be rather approximate though, these %% sizes are probably not very "fair" but we are just trying to see if %% we reach a fairly arbitrary limit anyway though. -term_limit(Thing, Max) -> +exceeds_size(Thing, Max) -> case term_size(Thing, Max, erlang:system_info(wordsize)) of limit_exceeded -> true; _ -> false |
