Skip to content

Commit

Permalink
Trivial: Simplify some deprecated code
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Geod24 committed Dec 18, 2023
1 parent 45b5870 commit 60d9cee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/dub/dub.d
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 60d9cee

Please sign in to comment.