summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-04 15:52:25 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-04 16:43:42 +0100
commitd596970f4b38385b04d6022516b82baf530a6387 (patch)
treeb8652fad0fd5434668ab3f7a5cf671fd5db43958 /src/main.rs
parent14c2abca5f1a0c6f9b7e78d1a4f0b6948dd788b7 (diff)
Remove all non-equality "Version constraint" implementation
This patch removes the idea of "version constraints" except for the equality constraint. This is due to the fact, that everything else might result in impurities. This might be reverted in the future and actual operators ("<" or ">" or ranges...) might be implemented. Thus, we keep the "=" equality sign as prefix for a version string, to be extensible here. This commit also fixes (automatically, because the implementation changed from the ground up) the issue that there was no difference between a version string and a version constraint string. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> (cherry picked from commit 7bbcca0356795ac60bf7761819b56430e0905a3c)
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs
index f3c35ab..04bf1ed 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -207,22 +207,12 @@ async fn what_depends(matches: &ArgMatches, repo: Repository, progress: Progress
async fn dependencies_of(matches: &ArgMatches, repo: Repository, progress: ProgressBar) -> Result<()> {
use filters::filter::Filter;
- use crate::package::PackageVersionConstraint;
let package_filter = {
let name = matches.value_of("package_name").map(String::from).map(PackageName::from).unwrap();
trace!("Checking for package with name = {}", name);
- let version_constraint = matches
- .value_of("package_version_constraint")
- .map(|s| PackageVersionConstraint::parse(s))
- .transpose()?;
-
- trace!("Checking for package with version constraint = {:?}", version_constraint);
-
- crate::util::filters::build_package_filter_by_name_and_version(
- name, version_constraint
- )
+ crate::util::filters::build_package_filter_by_name(name)
};
let format = matches.value_of("list-format").unwrap(); // safe by clap default value