From 6701046cdd85d7a702be38a593e8385a5dfb4562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Quei=C3=9Fner?= Date: Sun, 9 Aug 2020 17:40:58 +0200 Subject: [PATCH] Uses getWritten instead of .pos + slicing Co-authored-by: Joachim Schmidt --- lib/std/fmt.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig index 6141b18b5b..6dbef5db67 100644 --- a/lib/std/fmt.zig +++ b/lib/std/fmt.zig @@ -578,7 +578,7 @@ fn formatFloatValue( @compileError("Unknown format string: '" ++ fmt ++ "'"); } - return formatBuf(buf[0..buf_stream.pos], options, writer); + return formatBuf(buf_stream.getWritten(), options, writer); } pub fn formatText(