Skip to content

Commit 2bd356c

Browse files
committed
fix new clippy warnings
1 parent 8013f88 commit 2bd356c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ impl Config {
772772
optional = dep.optional;
773773
} else {
774774
enabled_feature_overrides.sort_by(|a, b| {
775-
fn min_version(r: metadata::VersionRange) -> &str {
775+
fn min_version(r: metadata::VersionRange<'_>) -> &str {
776776
match r.start_bound() {
777777
std::ops::Bound::Unbounded => unreachable!(),
778778
std::ops::Bound::Excluded(_) => unreachable!(),
@@ -902,14 +902,14 @@ impl Config {
902902

903903
// Check that the lib built internally matches the required version
904904
let version = metadata::parse_version(version_str);
905-
fn min_version(r: metadata::VersionRange) -> &str {
905+
fn min_version(r: metadata::VersionRange<'_>) -> &str {
906906
match r.start_bound() {
907907
std::ops::Bound::Unbounded => unreachable!(),
908908
std::ops::Bound::Excluded(_) => unreachable!(),
909909
std::ops::Bound::Included(b) => b,
910910
}
911911
}
912-
fn max_version(r: metadata::VersionRange) -> Option<&str> {
912+
fn max_version(r: metadata::VersionRange<'_>) -> Option<&str> {
913913
match r.end_bound() {
914914
std::ops::Bound::Included(_) => unreachable!(),
915915
std::ops::Bound::Unbounded => None,

src/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ impl<'a> std::ops::RangeBounds<&'a str> for VersionRange<'a> {
389389
}
390390
}
391391

392-
pub(crate) fn parse_version(version: &str) -> VersionRange {
392+
pub(crate) fn parse_version(version: &str) -> VersionRange<'_> {
393393
if let Some((min, max)) = version.split_once(',') {
394394
// Format checked when parsing
395395
let min = min.trim_start().strip_prefix(">=").unwrap().trim();

0 commit comments

Comments
 (0)