Remove redundant assumeUnique in std.path

This commit is contained in:
Dennis Korpel 2023-03-24 21:32:56 +01:00 committed by The Dlang Bot
parent 3c74c2b88a
commit 17b1a11afd

View file

@ -1758,7 +1758,6 @@ immutable(C)[] buildNormalizedPath(C)(const(C[])[] paths...)
if (isSomeChar!C)
{
import std.array : array;
import std.exception : assumeUnique;
const(C)[] chained;
foreach (path; paths)
@ -1770,7 +1769,7 @@ if (isSomeChar!C)
}
auto result = asNormalizedPath(chained);
// .array returns a copy, so it is unique
return () @trusted { return assumeUnique(result.array); } ();
return result.array;
}
///