summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-03-24 12:33:00 +0000
committerSimon MacMullen <simon@rabbitmq.com>2014-03-24 12:33:00 +0000
commit5b7a9d91885a40234ff681750c4c49b947648764 (patch)
tree55be534f3a2754c99f1b6eb9a89a5d5a18ae9f95
parent502d1c63340e01b5c74f99d0f9b76bacec8d5bf6 (diff)
downloadrabbitmq-server-5b7a9d91885a40234ff681750c4c49b947648764.tar.gz
Remove obsolete TODOs, fix a rather substantial bug.
-rw-r--r--src/truncate.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/truncate.erl b/src/truncate.erl
index 5708e21f..433a18e7 100644
--- a/src/truncate.erl
+++ b/src/truncate.erl
@@ -39,9 +39,7 @@ log_event(Event, _Size) ->
Event.
%% TODO: avoid copying
-%% TODO: can we get away with using binary:part/3 (OTP vsn requirements)?
-%% TODO: reconsider depth limit handling
-term(T, 0) -> T;
+term(_T, 0) -> '...';
term(T, N) when is_binary(T) andalso size(T) > N ->
Suffix = N - 3,
Len = case is_bitstring(T) of