Skip to content

Commit

Permalink
Polish.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Nov 22, 2023
1 parent 81bcda0 commit f1fa128
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/core/src/version_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ impl<'tool> VersionResolver<'tool> {
}
}

pub fn match_highest_version<'l>(
req: &'l VersionReq,
versions: &'l [&'l Version],
) -> Option<VersionSpec> {
pub fn match_highest_version(req: &VersionReq, versions: &[&Version]) -> Option<VersionSpec> {
let mut highest_match: Option<Version> = None;

for version in versions {
Expand Down Expand Up @@ -104,7 +101,7 @@ pub fn resolve_version(

match &candidate {
UnresolvedVersionSpec::Canary => {
return Ok(VersionSpec::Alias("canary".into()));
return Ok(VersionSpec::Canary);
}
UnresolvedVersionSpec::Alias(alias) => {
let mut alias_value = None;
Expand Down

0 comments on commit f1fa128

Please sign in to comment.