Completed attribute lithany on sameTail and sameHead

This commit is contained in:
Ate Eskola 2021-09-14 16:58:49 +03:00 committed by The Dlang Bot
parent 139a227da5
commit ee836dd748

View file

@ -1622,7 +1622,7 @@ private template isInputRangeOrConvertible(E)
`true` if $(D lhs.ptr == rhs.ptr), `false` otherwise. `true` if $(D lhs.ptr == rhs.ptr), `false` otherwise.
+/ +/
@safe @safe
pure nothrow bool sameHead(T)(in T[] lhs, in T[] rhs) pure nothrow @nogc bool sameHead(T)(in T[] lhs, in T[] rhs)
{ {
return lhs.ptr == rhs.ptr; return lhs.ptr == rhs.ptr;
} }
@ -1650,7 +1650,7 @@ pure nothrow bool sameHead(T)(in T[] lhs, in T[] rhs)
`false` otherwise. `false` otherwise.
+/ +/
@trusted @trusted
pure nothrow bool sameTail(T)(in T[] lhs, in T[] rhs) pure nothrow @nogc bool sameTail(T)(in T[] lhs, in T[] rhs)
{ {
return lhs.ptr + lhs.length == rhs.ptr + rhs.length; return lhs.ptr + lhs.length == rhs.ptr + rhs.length;
} }