From 60d9cee3884ef6bd0700ee423da1c2b266d93483 Mon Sep 17 00:00:00 2001 From: Mathias Lang Date: Mon, 18 Dec 2023 13:24:22 +0100 Subject: [PATCH] Trivial: Simplify some deprecated code While this code is deprecated, it is confusing as it is using findPackageFile only to provide a worse error message than one would have got by simply calling Package.load. --- source/dub/dub.d | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/dub/dub.d b/source/dub/dub.d index bcae42fb1..0d7e99d3a 100644 --- a/source/dub/dub.d +++ b/source/dub/dub.d @@ -795,9 +795,7 @@ class Dub { deprecated("Use `clean(Package)` instead") void cleanPackage(NativePath path) { - auto ppack = Package.findPackageFile(path); - enforce(!ppack.empty, "No package found.", path.toNativeString()); - this.clean(Package.load(path, ppack)); + this.clean(Package.load(path)); } /// Ditto