mirror of
https://github.com/dlang/phobos.git
synced 2025-05-12 07:08:48 +03:00
Standardize whitespace after imports
Unified with: sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
This commit is contained in:
parent
ff854b71b0
commit
2dfbc51f17
47 changed files with 274 additions and 274 deletions
|
@ -2949,7 +2949,7 @@ unittest
|
|||
@safe unittest //12569
|
||||
{
|
||||
import std.algorithm.comparison : max, min;
|
||||
import std.typecons: tuple;
|
||||
import std.typecons : tuple;
|
||||
dchar c = 'a';
|
||||
reduce!(min, max)(tuple(c, c), "hello"); // OK
|
||||
static assert(!is(typeof(reduce!(min, max)(tuple(c), "hello"))));
|
||||
|
@ -3029,7 +3029,7 @@ template fold(fun...) if (fun.length >= 1)
|
|||
}
|
||||
else
|
||||
{
|
||||
import std.typecons: tuple;
|
||||
import std.typecons : tuple;
|
||||
return reduce!fun(tuple(seed), r);
|
||||
}
|
||||
}
|
||||
|
@ -3046,8 +3046,8 @@ template fold(fun...) if (fun.length >= 1)
|
|||
// Sum all elements with explicit seed
|
||||
assert(arr.fold!((a, b) => a + b)(6) == 21);
|
||||
|
||||
import std.algorithm.comparison: min, max;
|
||||
import std.typecons: tuple;
|
||||
import std.algorithm.comparison : min, max;
|
||||
import std.typecons : tuple;
|
||||
|
||||
// Compute minimum and maximum at the same time
|
||||
assert(arr.fold!(min, max) == tuple(1, 5));
|
||||
|
|
|
@ -111,8 +111,8 @@ See_Also:
|
|||
size_t bringToFront(Range1, Range2)(Range1 front, Range2 back)
|
||||
if (isInputRange!Range1 && isForwardRange!Range2)
|
||||
{
|
||||
import std.range: take, Take;
|
||||
import std.array: sameHead;
|
||||
import std.range : take, Take;
|
||||
import std.array : sameHead;
|
||||
enum bool sameHeadExists = is(typeof(front.sameHead(back)));
|
||||
size_t result;
|
||||
for (bool semidone; !front.empty && !back.empty; )
|
||||
|
@ -758,7 +758,7 @@ void initializeAll(Range)(Range range)
|
|||
///
|
||||
unittest
|
||||
{
|
||||
import core.stdc.stdlib: malloc, free;
|
||||
import core.stdc.stdlib : malloc, free;
|
||||
|
||||
struct S
|
||||
{
|
||||
|
@ -2416,7 +2416,7 @@ void swapAt(R)(auto ref R r, size_t i1, size_t i2)
|
|||
///
|
||||
pure @safe nothrow unittest
|
||||
{
|
||||
import std.algorithm.comparison: equal;
|
||||
import std.algorithm.comparison : equal;
|
||||
auto a = [1, 2, 3];
|
||||
a.swapAt(1, 2);
|
||||
assert(a.equal([1, 3, 2]));
|
||||
|
@ -2424,7 +2424,7 @@ pure @safe nothrow unittest
|
|||
|
||||
pure @safe nothrow unittest
|
||||
{
|
||||
import std.algorithm.comparison: equal;
|
||||
import std.algorithm.comparison : equal;
|
||||
auto a = [4, 5, 6];
|
||||
a.swapAt(1, 1);
|
||||
assert(a.equal([4, 5, 6]));
|
||||
|
@ -2433,8 +2433,8 @@ pure @safe nothrow unittest
|
|||
pure @safe nothrow unittest
|
||||
{
|
||||
// test non random access ranges
|
||||
import std.algorithm.comparison: equal;
|
||||
import std.array: array;
|
||||
import std.algorithm.comparison : equal;
|
||||
import std.array : array;
|
||||
|
||||
char[] b = ['a', 'b', 'c'];
|
||||
b.swapAt(1, 2);
|
||||
|
|
|
@ -3127,7 +3127,7 @@ auto minElement(alias map = "a", Range, RangeElementType = ElementType!Range)
|
|||
///
|
||||
@safe pure unittest
|
||||
{
|
||||
import std.range: enumerate;
|
||||
import std.range : enumerate;
|
||||
|
||||
assert([2, 1, 4, 3].minElement == 1);
|
||||
|
||||
|
@ -3144,7 +3144,7 @@ auto minElement(alias map = "a", Range, RangeElementType = ElementType!Range)
|
|||
|
||||
@safe pure unittest
|
||||
{
|
||||
import std.range: enumerate, iota;
|
||||
import std.range : enumerate, iota;
|
||||
// supports mapping
|
||||
assert([3, 4, 5, 1, 2].enumerate.minElement!"a.value" == tuple(3, 1));
|
||||
assert([5, 2, 4].enumerate.minElement!"a.value" == tuple(1, 2));
|
||||
|
@ -3217,7 +3217,7 @@ auto maxElement(alias map = "a", Range, RangeElementType = ElementType!Range)
|
|||
///
|
||||
@safe pure unittest
|
||||
{
|
||||
import std.range: enumerate;
|
||||
import std.range : enumerate;
|
||||
assert([2, 1, 4, 3].maxElement == 4);
|
||||
|
||||
// allows to get the index of an element too
|
||||
|
@ -3233,7 +3233,7 @@ auto maxElement(alias map = "a", Range, RangeElementType = ElementType!Range)
|
|||
|
||||
@safe pure unittest
|
||||
{
|
||||
import std.range: enumerate, iota;
|
||||
import std.range : enumerate, iota;
|
||||
|
||||
// supports mapping
|
||||
assert([3, 4, 5, 1, 2].enumerate.maxElement!"a.value" == tuple(2, 5));
|
||||
|
|
|
@ -339,7 +339,7 @@ auto cartesianProduct(R1, R2)(R1 range1, R2 range2)
|
|||
// Issue 13091
|
||||
pure nothrow @safe @nogc unittest
|
||||
{
|
||||
import std.algorithm: cartesianProduct;
|
||||
import std.algorithm : cartesianProduct;
|
||||
int[1] a = [1];
|
||||
foreach (t; cartesianProduct(a[], a[])) {}
|
||||
}
|
||||
|
|
|
@ -865,7 +865,7 @@ template multiSort(less...) //if (less.length > 1)
|
|||
if (validPredicates!(ElementType!Range, less))
|
||||
{
|
||||
import std.range : assumeSorted;
|
||||
import std.meta: AliasSeq;
|
||||
import std.meta : AliasSeq;
|
||||
static if (is(typeof(less[$ - 1]) == SwapStrategy))
|
||||
{
|
||||
enum ss = less[$ - 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue