summaryrefslogtreecommitdiffstats
path: root/src/commands/lint.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/lint.rs')
-rw-r--r--src/commands/lint.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/lint.rs b/src/commands/lint.rs
index 9ad9c7d..2a54c62 100644
--- a/src/commands/lint.rs
+++ b/src/commands/lint.rs
@@ -8,6 +8,7 @@
// SPDX-License-Identifier: EPL-2.0
//
+use std::convert::TryFrom;
use std::path::Path;
use anyhow::anyhow;
@@ -36,8 +37,7 @@ pub async fn lint(
.map(PackageName::from);
let pvers = matches
.value_of("package_version")
- .map(String::from)
- .map(PackageVersionConstraint::new)
+ .map(PackageVersionConstraint::try_from)
.transpose()?;
let bar = progressbars.bar();