Skip to content

Commit

Permalink
findAdjacent and findAmong should be @safe
Browse files Browse the repository at this point in the history
  • Loading branch information
braddr committed Oct 13, 2014
1 parent 13791bf commit 8bcf058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/algorithm.d
Original file line number Diff line number Diff line change
Expand Up @@ -7210,7 +7210,7 @@ Range findAdjacent(alias pred = "a == b", Range)(Range r)
}

///
unittest
@safe unittest
{
int[] a = [ 11, 10, 10, 9, 8, 8, 7, 8, 9 ];
auto r = findAdjacent(a);
Expand All @@ -7220,7 +7220,7 @@ unittest

}

unittest
@safe unittest
{
//scope(success) writeln("unittest @", __FILE__, ":", __LINE__, " done.");
int[] a = [ 11, 10, 10, 9, 8, 8, 7, 8, 9 ];
Expand Down Expand Up @@ -7266,14 +7266,14 @@ Range1 findAmong(alias pred = "a == b", Range1, Range2)(
}

///
unittest
@safe unittest
{
int[] a = [ -1, 0, 1, 2, 3, 4, 5 ];
int[] b = [ 3, 1, 2 ];
assert(findAmong(a, b) == a[2 .. $]);
}

unittest
@safe unittest
{
//scope(success) writeln("unittest @", __FILE__, ":", __LINE__, " done.");
int[] a = [ -1, 0, 2, 1, 2, 3, 4, 5 ];
Expand Down

0 comments on commit 8bcf058

Please sign in to comment.