aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-05-12 12:14:33 +0200
committerBjörn Gustavsson <[email protected]>2016-05-13 10:52:25 +0200
commit8bc4519e7337904354029580684f3c173b65fb5c (patch)
treef5b54aa494b6d6ef0bb5c1251825caf7eb1f1e1d /lib
parent5f2b8912d234c834b6f8c24ab38cf02dd52fc31b (diff)
downloadotp-8bc4519e7337904354029580684f3c173b65fb5c.tar.gz
otp-8bc4519e7337904354029580684f3c173b65fb5c.tar.bz2
otp-8bc4519e7337904354029580684f3c173b65fb5c.zip
core_pp: Remove unused clauses in unindent/3 to improve coverage
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/core_pp.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/compiler/src/core_pp.erl b/lib/compiler/src/core_pp.erl
index b2bb1ecd32..623722df94 100644
--- a/lib/compiler/src/core_pp.erl
+++ b/lib/compiler/src/core_pp.erl
@@ -483,6 +483,7 @@ spaces(5) -> " ";
spaces(6) -> " ";
spaces(7) -> " ".
+%% Undo indentation done by nl_indent/1.
unindent(T, Ctxt) ->
unindent(T, Ctxt#ctxt.indent, []).
@@ -498,12 +499,7 @@ unindent([$\t|T], N, C) ->
unindent([spaces(Tab - N)|T], 0, C)
end;
unindent([L|T], N, C) when is_list(L) ->
- unindent(L, N, [T|C]);
-unindent([H|T], _, C) ->
- [H|[T|C]];
-unindent([], N, [H|T]) ->
- unindent(H, N, T);
-unindent([], _, []) -> [].
+ unindent(L, N, [T|C]).
width(Txt, Ctxt) ->