diff --git a/insta/src/content/serialization.rs b/insta/src/content/serialization.rs index e9223e2a..cb0e951d 100644 --- a/insta/src/content/serialization.rs +++ b/insta/src/content/serialization.rs @@ -18,7 +18,7 @@ pub enum Key<'a> { Other, } -impl<'a> Key<'a> { +impl Key<'_> { /// Needed because [`std::mem::discriminant`] is not [`Ord`] fn discriminant(&self) -> usize { match self { @@ -35,9 +35,9 @@ impl<'a> Key<'a> { } } -impl<'a> Eq for Key<'a> {} +impl Eq for Key<'_> {} -impl<'a> Ord for Key<'a> { +impl Ord for Key<'_> { fn cmp(&self, other: &Self) -> Ordering { let self_discriminant = self.discriminant(); let other_discriminant = other.discriminant(); @@ -58,7 +58,7 @@ impl<'a> Ord for Key<'a> { } } -impl<'a> PartialOrd for Key<'a> { +impl PartialOrd for Key<'_> { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } diff --git a/insta/src/redaction.rs b/insta/src/redaction.rs index 423e7fec..5473549b 100644 --- a/insta/src/redaction.rs +++ b/insta/src/redaction.rs @@ -26,7 +26,7 @@ impl SelectorParseError { #[cfg_attr(docsrs, doc(cfg(feature = "redactions")))] pub struct ContentPath<'a>(&'a [PathItem]); -impl<'a> fmt::Display for ContentPath<'a> { +impl fmt::Display for ContentPath<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { for item in self.0.iter() { write!(f, ".")?; @@ -47,7 +47,7 @@ impl<'a> fmt::Display for ContentPath<'a> { } /// Replaces a value with another one. - +/// /// Represents a redaction. #[cfg_attr(docsrs, doc(cfg(feature = "redactions")))] pub enum Redaction {