From a670e3191800f93bbfe357e8de61caa8640a6588 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Wed, 14 Mar 2018 10:49:06 +0100 Subject: [PATCH] Remove a cast from std.process --- std/process.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/std/process.d b/std/process.d index defc2b27ce6..5bf6b78374e 100644 --- a/std/process.d +++ b/std/process.d @@ -2513,7 +2513,7 @@ private auto executeImpl(alias pipeFunc, Cmd, ExtraPipeFuncArgs...)( auto p = pipeFunc(commandLine, redirect, env, config, workDir, extraArgs); - auto a = appender!(ubyte[])(); + auto a = appender!string; enum size_t defaultChunkSize = 4096; immutable chunkSize = min(maxOutput, defaultChunkSize); @@ -2532,7 +2532,7 @@ private auto executeImpl(alias pipeFunc, Cmd, ExtraPipeFuncArgs...)( // Exhaust the stream, if necessary. foreach (ubyte[] chunk; p.stdout.byChunk(defaultChunkSize)) { } - return Tuple!(int, "status", string, "output")(wait(p.pid), cast(string) a.data); + return Tuple!(int, "status", string, "output")(wait(p.pid), a.data); } @system unittest