From d3ef34b325eafca43405ee2b8390e1b6f218b644 Mon Sep 17 00:00:00 2001 From: John Dupuy Date: Fri, 15 May 2020 11:28:19 -0500 Subject: [PATCH] Removed unneeded conversion --- faststreams/textio.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/faststreams/textio.nim b/faststreams/textio.nim index 8a138c8..74f69bf 100644 --- a/faststreams/textio.nim +++ b/faststreams/textio.nim @@ -103,9 +103,8 @@ when defined(c): ## with the 'c' flag. Otherwise, float types are passed to the generic writeText ## procedure. var buffer: array[65, char] - discard writeFloatToBuffer(buffer, x) - let bs: cstring = addr buffer - write s, bs.toOpenArray(0, bs.len - 1) + let blen = writeFloatToBuffer(buffer, x) + write s, buffer.toOpenArray(0, blen - 1) template writeText*(s: OutputStream, str: string) = write s, str