Implement VersionRange.allowsAll() in terms of allowsLower/Higher()
diff --git a/pkgs/pub_semver/lib/src/version_range.dart b/pkgs/pub_semver/lib/src/version_range.dart index bce869b..8e9b4ad 100644 --- a/pkgs/pub_semver/lib/src/version_range.dart +++ b/pkgs/pub_semver/lib/src/version_range.dart
@@ -137,19 +137,7 @@ } if (other is VersionRange) { - if (min != null) { - if (other.min == null) return false; - if (min > other.min) return false; - if (min == other.min && !includeMin && other.includeMin) return false; - } - - if (max != null) { - if (other.max == null) return false; - if (max < other.max) return false; - if (max == other.max && !includeMax && other.includeMax) return false; - } - - return true; + return !allowsLower(other, this) && !allowsHigher(other, this); } throw new ArgumentError('Unknown VersionConstraint type $other.');