We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
TryFrom<PartialVersion>
RustVersion
1 parent 9e0cdc2 commit 04c956cCopy full SHA for 04c956c
crates/cargo-util-schemas/src/manifest.rs
@@ -1417,6 +1417,14 @@ impl std::str::FromStr for RustVersion {
1417
fn from_str(value: &str) -> Result<Self, Self::Err> {
1418
let partial = value.parse::<PartialVersion>();
1419
let partial = partial.map_err(RustVersionErrorKind::PartialVersion)?;
1420
+ partial.try_into()
1421
+ }
1422
+}
1423
+
1424
+impl TryFrom<PartialVersion> for RustVersion {
1425
+ type Error = RustVersionError;
1426
1427
+ fn try_from(partial: PartialVersion) -> Result<Self, Self::Error> {
1428
if partial.pre.is_some() {
1429
return Err(RustVersionErrorKind::Prerelease.into());
1430
}
0 commit comments