Make clippy happier (#72)

This commit is contained in:
Armin Ronacher 2025-01-19 00:31:21 +01:00 committed by GitHub
parent 7e15c44de1
commit 157f01564d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 13 additions and 17 deletions

View file

@ -44,17 +44,13 @@ where
}
}
impl<'old, 'new, Old: ?Sized, New: ?Sized, D: DiffHook> AsRef<D>
for Compact<'old, 'new, Old, New, D>
{
impl<Old: ?Sized, New: ?Sized, D: DiffHook> AsRef<D> for Compact<'_, '_, Old, New, D> {
fn as_ref(&self) -> &D {
&self.d
}
}
impl<'old, 'new, Old: ?Sized, New: ?Sized, D: DiffHook> AsMut<D>
for Compact<'old, 'new, Old, New, D>
{
impl<Old: ?Sized, New: ?Sized, D: DiffHook> AsMut<D> for Compact<'_, '_, Old, New, D> {
fn as_mut(&mut self) -> &mut D {
&mut self.d
}

View file

@ -388,7 +388,7 @@ fn test_deadline_reached() {
struct SlowIndex<'a>(&'a [usize]);
impl<'a> Index<usize> for SlowIndex<'a> {
impl Index<usize> for SlowIndex<'_> {
type Output = usize;
fn index(&self, index: usize) -> &Self::Output {

View file

@ -20,7 +20,7 @@ pub struct UniqueItem<'a, Idx: ?Sized> {
index: usize,
}
impl<'a, Idx: ?Sized> UniqueItem<'a, Idx>
impl<Idx: ?Sized> UniqueItem<'_, Idx>
where
Idx: Index<usize>,
{
@ -209,7 +209,7 @@ where
New(&'new New),
}
impl<'old, 'new, Old, New> Hash for Key<'old, 'new, Old, New>
impl<Old, New> Hash for Key<'_, '_, Old, New>
where
Old: Hash + ?Sized,
New: Hash + ?Sized,
@ -222,7 +222,7 @@ where
}
}
impl<'old, 'new, Old, New> PartialEq for Key<'old, 'new, Old, New>
impl<Old, New> PartialEq for Key<'_, '_, Old, New>
where
Old: Eq + ?Sized,
New: Eq + PartialEq<Old> + ?Sized,
@ -237,7 +237,7 @@ where
}
}
impl<'old, 'new, Old, New> Eq for Key<'old, 'new, Old, New>
impl<Old, New> Eq for Key<'_, '_, Old, New>
where
Old: Eq + ?Sized,
New: Eq + PartialEq<Old> + ?Sized,