lib/core: Removed a few abusive uses of `to_s_with_length` on Array and NativeArray
authorLucas Bajolet <r4pass@hotmail.com>
Fri, 11 Sep 2015 15:36:56 +0000 (11:36 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Fri, 11 Sep 2015 15:36:56 +0000 (11:36 -0400)
Since they're working with Nit-produced Strings, there's no need to clean once more

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

lib/core/text/flat.nit

index 2d4a942..52de988 100644 (file)
@@ -1185,7 +1185,7 @@ redef class Array[E]
                        end
                        i += 1
                end
-               return ns.to_s_with_length(sl)
+               return new FlatString.with_infos(ns, sl, 0, sl - 1)
        end
 end
 
@@ -1222,7 +1222,7 @@ redef class NativeArray[E]
                        end
                        i += 1
                end
-               return ns.to_s_with_length(sl)
+               return new FlatString.with_infos(ns, sl, 0, sl - 1)
        end
 end