Showing with 11 additions and 10 deletions.
  1. +3 −2 std/path.d
  2. +4 −4 std/process.d
  3. +4 −4 std/random.d
5 changes: 3 additions & 2 deletions std/path.d
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,8 @@ auto asRelativePath(CaseSensitive cs = CaseSensitive.osDefault, R1, R2)

import std.range.primitives : walkLength;
import std.range : repeat, chain, choose;
import std.algorithm : mismatch, joiner;
import std.algorithm.comparison : mismatch;
import std.algorithm.iteration : joiner;
import std.array : array;
import std.utf : byCodeUnit, byChar;

Expand Down Expand Up @@ -3164,7 +3165,7 @@ bool globMatch(CaseSensitive cs = CaseSensitive.osDefault, C, Range)
in
{
// Verify that pattern[] is valid
import std.algorithm : balancedParens;
import std.algorithm.searching : balancedParens;
assert(balancedParens(pattern, '[', ']', 0));
assert(balancedParens(pattern, '{', '}', 0));
}
Expand Down
8 changes: 4 additions & 4 deletions std/process.d
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private Pid spawnProcessImpl(in char[][] args,
import core.exception : RangeError;
import std.conv : text;
import std.path : isDirSeparator;
import std.algorithm : any;
import std.algorithm.searching : any;
import std.string : toStringz;

if (args.empty) throw new RangeError();
Expand Down Expand Up @@ -752,7 +752,7 @@ private string searchPathFor(in char[] executable)
@trusted //TODO: @safe nothrow
{
import std.conv : to;
import std.algorithm : splitter;
import std.algorithm.iteration : splitter;
import std.path : buildPath;

auto pathz = core.stdc.stdlib.getenv("PATH");
Expand Down Expand Up @@ -2177,7 +2177,7 @@ private auto executeImpl(alias pipeFunc, Cmd, ExtraPipeFuncArgs...)(
{
import std.typecons : Tuple;
import std.array : appender;
import std.algorithm : min;
import std.algorithm.comparison : min;

auto p = pipeFunc(commandLine, Redirect.stdout | Redirect.stderrToStdout,
env, config, workDir, extraArgs);
Expand Down Expand Up @@ -2753,7 +2753,7 @@ version(Windows) version(unittest)

string[] parseCommandLine(string line)
{
import std.algorithm : map;
import std.algorithm.iteration : map;
import std.array : array;
LPWSTR lpCommandLine = (to!(wchar[])(line) ~ "\0"w).ptr;
int numArgs;
Expand Down
8 changes: 4 additions & 4 deletions std/random.d
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ A singleton instance of the default random number generator
*/
@property ref Random rndGen() @safe
{
import std.algorithm : map;
import std.algorithm.iteration : map;
import std.range : repeat;

static Random result;
Expand Down Expand Up @@ -1875,7 +1875,7 @@ void partialShuffle(Range, RandomGen)(Range r, in size_t n, ref RandomGen gen)
if (isRandomAccessRange!Range && isUniformRNG!RandomGen)
{
import std.exception : enforce;
import std.algorithm : swapAt;
import std.algorithm.mutation : swapAt;
enforce(n <= r.length, "n must be <= r.length for partialShuffle.");
foreach (i; 0 .. n)
{
Expand Down Expand Up @@ -1988,13 +1988,13 @@ private size_t diceImpl(Rng, Range)(ref Rng rng, Range proportions)
if (isForwardRange!Range && isNumeric!(ElementType!Range) && isForwardRange!Rng)
in
{
import std.algorithm : all;
import std.algorithm.searching : all;
assert(proportions.save.all!"a >= 0");
}
body
{
import std.exception : enforce;
import std.algorithm : reduce;
import std.algorithm.iteration : reduce;
double sum = reduce!"a + b"(0.0, proportions.save);
enforce(sum > 0, "Proportions in a dice cannot sum to zero");
immutable point = uniform(0.0, sum, rng);
Expand Down