From 838c28f198731eb33d8b80599df30e06b7091efb Mon Sep 17 00:00:00 2001 From: Brad Roberts Date: Mon, 13 Oct 2014 00:56:13 -0700 Subject: [PATCH] endsWith and skipOver should be @safe --- std/algorithm.d | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/std/algorithm.d b/std/algorithm.d index 9da674f3e..6132f6e16 100644 --- a/std/algorithm.d +++ b/std/algorithm.d @@ -6739,7 +6739,7 @@ if (is(typeof(binaryFun!pred(r1.front, r2.front)))) } /// -unittest +@safe unittest { auto s1 = "Hello world"; assert(!skipOver(s1, "Ha")); @@ -6769,7 +6769,7 @@ if (is(typeof(binaryFun!pred(r.front, e)))) } /// -unittest { +@safe unittest { auto s1 = "Hello world"; assert(!skipOver(s1, 'a')); assert(s1 == "Hello world"); @@ -6807,7 +6807,7 @@ void skipAll(alias pred = "a == b", R, Es...)(ref R r, Es es) } } -unittest +@safe unittest { //scope(success) writeln("unittest @", __FILE__, ":", __LINE__, " done."); auto s1 = "Hello world"; @@ -6922,7 +6922,7 @@ if (isBidirectionalRange!R && } /// -unittest +@safe unittest { assert(endsWith("abc", "")); assert(!endsWith("abc", "b")); @@ -6936,7 +6936,7 @@ unittest assert(endsWith("abc", "x", "aaa", 'c', "sab") == 3); } -unittest +@safe unittest { import std.conv : to;