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.
+/
@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;
}
@ -1650,7 +1650,7 @@ pure nothrow bool sameHead(T)(in T[] lhs, in T[] rhs)
`false` otherwise.
+/
@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;
}