diff options
author | Johannes Rudolph <johannes.rudolph@gmail.com> | 2014-03-11 16:51:40 +0100 |
---|---|---|
committer | Johannes Rudolph <johannes.rudolph@gmail.com> | 2014-03-11 16:51:40 +0100 |
commit | af38d4df5a099acaba859ea8364a573ac35b8dfe (patch) | |
tree | b8eb813d1416fe255d584fb7bf0e49be330d2135 /src/main/scala/spray | |
parent | b477b82f98ce656b967be0916124cdcf1dab8126 (diff) | |
download | spray-json-af38d4df5a099acaba859ea8364a573ac35b8dfe.tar.gz spray-json-af38d4df5a099acaba859ea8364a573ac35b8dfe.tar.bz2 spray-json-af38d4df5a099acaba859ea8364a573ac35b8dfe.zip |
Fix error introduced in 3f56c8f (#92)
Diffstat (limited to 'src/main/scala/spray')
-rw-r--r-- | src/main/scala/spray/json/PrettyPrinter.scala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/scala/spray/json/PrettyPrinter.scala b/src/main/scala/spray/json/PrettyPrinter.scala index f1604ff..5a2f142 100644 --- a/src/main/scala/spray/json/PrettyPrinter.scala +++ b/src/main/scala/spray/json/PrettyPrinter.scala @@ -56,12 +56,13 @@ trait PrettyPrinter extends JsonPrinter { sb.append(']') } - @tailrec protected def printIndent(sb: StringBuilder, indent: Int) { - if (indent > 0) { - sb.append(' ') - printIndent(sb, indent - 1) - } + @tailrec def rec(indent: Int): Unit = + if (indent > 0) { + sb.append(' ') + rec(indent - 1) + } + rec(indent) } } |