diff options
Diffstat (limited to 'src/commands/tree_of.rs')
-rw-r--r-- | src/commands/tree_of.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index 30196b7..10e51d3 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -8,6 +8,8 @@ // SPDX-License-Identifier: EPL-2.0 // +use std::convert::TryFrom; + use anyhow::Error; use anyhow::Result; use clap::ArgMatches; @@ -31,8 +33,7 @@ pub async fn tree_of( .map(PackageName::from); let pvers = matches .value_of("package_version") - .map(String::from) - .map(PackageVersionConstraint::new) + .map(PackageVersionConstraint::try_from) .transpose()?; repo.packages() |