From 428eecc2a1dcdfb7be371daeadefd337f518d42f Mon Sep 17 00:00:00 2001 From: electricface Date: Thu, 18 Apr 2024 19:14:23 +0800 Subject: [PATCH] Update workspace-d/source/workspaced/com/dub.d Co-authored-by: Jan Jurzitza --- workspace-d/source/workspaced/com/dub.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workspace-d/source/workspaced/com/dub.d b/workspace-d/source/workspaced/com/dub.d index 206e032..fefb024 100644 --- a/workspace-d/source/workspaced/com/dub.d +++ b/workspace-d/source/workspaced/com/dub.d @@ -1037,7 +1037,9 @@ string[] listDependencies(scope const Package pkg) foreach (dep; deps) dependencies ~= dep.name; // Filter duplicates in-place using copy - dependencies.length -= dependencies.sort.uniq().copy(dependencies).length; + dependencies.sort(); + // copy + this length construct allows us to `uniq` in-place + dependencies.length -= dependencies.uniq().copy(dependencies).length; return dependencies; }