templater: micro-optimize join() with empty separator
authorYuya Nishihara <yuya@tcha.org>
Tue, 20 Mar 2018 23:16:28 +0900
changeset 37326 9cd88dd3bf64
parent 37325 41a5d815d2c1
child 37327 ebf139cbd4a1
templater: micro-optimize join() with empty separator
mercurial/templateutil.py
--- a/mercurial/templateutil.py	Sat Mar 17 21:42:27 2018 +0900
+++ b/mercurial/templateutil.py	Tue Mar 20 23:16:28 2018 +0900
@@ -558,6 +558,6 @@
     for x in itemiter:
         if first:
             first = False
-        else:
+        elif sep:
             yield sep
         yield x