Skip to content

Commit

Permalink
Fix existing clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cd-work committed Dec 17, 2024
1 parent 3af06fb commit 56c8ff4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion purl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl PurlShape for String {
/// Without type-specific functionality, it's possible to create PURLs that have
/// incorrect capitalization or are missing a required namespace or required
/// qualifiers.
impl<'a> PurlShape for Cow<'a, str> {
impl PurlShape for Cow<'_, str> {
type Error = ParseError;

fn package_type(&self) -> Cow<str> {
Expand Down
2 changes: 1 addition & 1 deletion purl/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ mod de {

struct PurlVisitor<T>(PhantomData<T>);

impl<'de, T> Visitor<'de> for PurlVisitor<T>
impl<T> Visitor<'_> for PurlVisitor<T>
where
T: FromStr + PurlShape,
<T as PurlShape>::Error: fmt::Display + From<<T as FromStr>::Err>,
Expand Down
8 changes: 4 additions & 4 deletions purl/src/qualifiers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,9 @@ impl<'a> Iterator for Iter<'a> {
}
}

impl<'a> ExactSizeIterator for Iter<'a> {}
impl ExactSizeIterator for Iter<'_> {}

impl<'a> DoubleEndedIterator for Iter<'a> {
impl DoubleEndedIterator for Iter<'_> {
fn next_back(&mut self) -> Option<Self::Item> {
let (k, v) = self.0.next_back()?;
Some((k, v.as_str()))
Expand Down Expand Up @@ -534,9 +534,9 @@ impl<'a> Iterator for IterMut<'a> {
}
}

impl<'a> ExactSizeIterator for IterMut<'a> {}
impl ExactSizeIterator for IterMut<'_> {}

impl<'a> DoubleEndedIterator for IterMut<'a> {
impl DoubleEndedIterator for IterMut<'_> {
fn next_back(&mut self) -> Option<Self::Item> {
let (k, v) = self.0.next_back()?;
Some((k, v))
Expand Down
6 changes: 3 additions & 3 deletions purl/src/qualifiers/well_known.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub struct Checksum<'a> {
algorithms: HashMap<SmallString, Cow<'a, str>>,
}

impl<'a> KnownQualifierKey for Checksum<'a> {
impl KnownQualifierKey for Checksum<'_> {
const KEY: &'static str = "checksum";
}

Expand Down Expand Up @@ -154,7 +154,7 @@ impl<'a> TryFrom<Checksum<'a>> for SmallString {
}
}

impl<'a> Checksum<'a> {
impl Checksum<'_> {
/// Get a reference to the hex bytes of a hash.
///
/// The hash may not be valid hex bytes.
Expand Down Expand Up @@ -258,7 +258,7 @@ impl<'a> ChecksumValue<'a> {
}
}

impl<'a> Deref for ChecksumValue<'a> {
impl Deref for ChecksumValue<'_> {
type Target = str;

fn deref(&self) -> &Self::Target {
Expand Down

0 comments on commit 56c8ff4

Please sign in to comment.