Make clippy happier (#72)
This commit is contained in:
parent
7e15c44de1
commit
157f01564d
8 changed files with 13 additions and 17 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<'lookup, Old, New, T> Iterator for ChangesIter<'lookup, Old, New, T>
|
||||
impl<Old, New, T> Iterator for ChangesIter<'_, Old, New, T>
|
||||
where
|
||||
Old: Index<usize, Output = T> + ?Sized,
|
||||
New: Index<usize, Output = T> + ?Sized,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ impl DiffableStrRef for String {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T: DiffableStr + ?Sized> DiffableStrRef for Cow<'a, T> {
|
||||
impl<T: DiffableStr + ?Sized> DiffableStrRef for Cow<'_, T> {
|
||||
type Output = T;
|
||||
|
||||
fn as_diffable_str(&self) -> &T {
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@ impl<'old, 'new, 'bufs, T: DiffableStr + ?Sized + 'old + 'new> TextDiff<'old, 'n
|
|||
pub fn iter_inline_changes<'slf>(
|
||||
&'slf self,
|
||||
op: &DiffOp,
|
||||
) -> impl Iterator<Item = InlineChange<'slf, T>> + '_
|
||||
) -> impl Iterator<Item = InlineChange<'slf, T>> + 'slf
|
||||
where
|
||||
'slf: 'old + 'new,
|
||||
{
|
||||
|
|
@ -558,7 +558,7 @@ impl<'old, 'new, 'bufs, T: DiffableStr + ?Sized + 'old + 'new> TextDiff<'old, 'n
|
|||
&'slf self,
|
||||
op: &DiffOp,
|
||||
deadline: Option<Instant>,
|
||||
) -> impl Iterator<Item = InlineChange<'slf, T>> + '_
|
||||
) -> impl Iterator<Item = InlineChange<'slf, T>> + 'slf
|
||||
where
|
||||
'slf: 'old + 'new,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ mod text_additions {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'s, T: DiffableStr + ?Sized> fmt::Display for Change<&'s T> {
|
||||
impl<T: DiffableStr + ?Sized> fmt::Display for Change<&T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ impl<'x, T: DiffableStr + ?Sized> SliceRemapper<'x, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'x, T: DiffableStr + ?Sized> Index<Range<usize>> for SliceRemapper<'x, T> {
|
||||
impl<T: DiffableStr + ?Sized> Index<Range<usize>> for SliceRemapper<'_, T> {
|
||||
type Output = T;
|
||||
|
||||
fn index(&self, range: Range<usize>) -> &Self::Output {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue