fix(pkgid): More consistently refer to SemVer

This commit is contained in:
Ed Page 2023-08-29 10:49:09 -05:00
parent 4238f689f5
commit c88137cd62
3 changed files with 7 additions and 4 deletions

View file

@ -15,7 +15,10 @@ impl<'a> ToSemver for &'a str {
fn to_semver(self) -> CargoResult<Version> {
match Version::parse(self.trim()) {
Ok(v) => Ok(v),
Err(..) => Err(anyhow::format_err!("cannot parse '{}' as a semver", self)),
Err(..) => Err(anyhow::format_err!(
"cannot parse '{}' as a SemVer version",
self
)),
}
}
}

View file

@ -230,7 +230,7 @@ fn ambiguous_version_no_longer_allowed() {
cargo_process("install foo --version=1.0")
.with_stderr(
"\
[ERROR] invalid value '1.0' for '--version <VERSION>': cannot parse '1.0' as a semver
[ERROR] invalid value '1.0' for '--version <VERSION>': cannot parse '1.0' as a SemVer version
tip: if you want to specify SemVer range, add an explicit qualifier, like '^1.0'

View file

@ -156,7 +156,7 @@ error: invalid package ID specification: `two-ver@0`
<tab>Did you mean `two-ver`?
Caused by:
cannot parse '0' as a semver
cannot parse '0' as a SemVer version
",
)
.run();
@ -169,7 +169,7 @@ Caused by:
error: invalid package ID specification: `two-ver@0.2`
Caused by:
cannot parse '0.2' as a semver
cannot parse '0.2' as a SemVer version
",
)
.run();