diff --git a/cli/src/formatter.rs b/cli/src/formatter.rs index 400597395b..20133f07dd 100644 --- a/cli/src/formatter.rs +++ b/cli/src/formatter.rs @@ -648,7 +648,7 @@ impl Write for FormatRecorder { struct RawEscapeSequenceRecorder<'a>(&'a mut FormatRecorder); -impl<'a> Write for RawEscapeSequenceRecorder<'a> { +impl Write for RawEscapeSequenceRecorder<'_> { fn write(&mut self, data: &[u8]) -> io::Result { self.0.push_op(FormatOp::RawEscapeSequence(data.to_vec())); Ok(data.len()) diff --git a/cli/src/graphlog.rs b/cli/src/graphlog.rs index ec9a33f60f..fc0fb0cb27 100644 --- a/cli/src/graphlog.rs +++ b/cli/src/graphlog.rs @@ -57,7 +57,7 @@ impl From<&Edge> for Ancestor { } } -impl<'writer, K, R> GraphLog for SaplingGraphLog<'writer, R> +impl GraphLog for SaplingGraphLog<'_, R> where K: Clone + Eq + Hash, R: Renderer, diff --git a/lib/src/default_index/revset_engine.rs b/lib/src/default_index/revset_engine.rs index ca3678dcc0..6af05edb90 100644 --- a/lib/src/default_index/revset_engine.rs +++ b/lib/src/default_index/revset_engine.rs @@ -752,7 +752,7 @@ fn to_u32_generation_range(range: &Range) -> Result, RevsetEvalu Ok(start..end) } -impl<'index> EvaluationContext<'index> { +impl EvaluationContext<'_> { fn evaluate( &self, expression: &ResolvedExpression, diff --git a/lib/src/diff.rs b/lib/src/diff.rs index 4903aa2ecc..c3c7c95aba 100644 --- a/lib/src/diff.rs +++ b/lib/src/diff.rs @@ -850,7 +850,7 @@ impl<'diff, 'input> DiffHunkIterator<'diff, 'input> { } } -impl<'diff, 'input> Iterator for DiffHunkIterator<'diff, 'input> { +impl<'input> Iterator for DiffHunkIterator<'_, 'input> { type Item = DiffHunk<'input>; fn next(&mut self) -> Option { diff --git a/lib/src/files.rs b/lib/src/files.rs index ebb5ba31ff..f0171d49e1 100644 --- a/lib/src/files.rs +++ b/lib/src/files.rs @@ -109,7 +109,7 @@ where } } -impl<'a, I> DiffLineIterator<'a, I> { +impl DiffLineIterator<'_, I> { /// Returns line number of the next hunk. After all hunks are consumed, this /// returns the next line number if the last hunk ends with newline. pub fn next_line_number(&self) -> DiffLineNumber { diff --git a/lib/src/id_prefix.rs b/lib/src/id_prefix.rs index 8a0458eb23..0e2f1f39f8 100644 --- a/lib/src/id_prefix.rs +++ b/lib/src/id_prefix.rs @@ -448,7 +448,7 @@ pub struct IdIndexLookup<'i, 'q, K, P, S, const N: usize> { pos: usize, // may be index.len() } -impl<'i, 'q, K, P, S, const N: usize> IdIndexLookup<'i, 'q, K, P, S, N> +impl IdIndexLookup<'_, '_, K, P, S, N> where K: ObjectId + Eq, S: IdIndexSource

, diff --git a/lib/src/revset.rs b/lib/src/revset.rs index e32d8738ee..a2bd0af997 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -2225,7 +2225,7 @@ pub trait RevsetIteratorExt<'index, I> { fn reversed(self) -> ReverseRevsetIterator; } -impl<'index, I: Iterator> RevsetIteratorExt<'index, I> for I { +impl> RevsetIteratorExt<'_, I> for I { fn commits(self, store: &Arc) -> RevsetCommitIterator { RevsetCommitIterator { iter: self, diff --git a/lib/src/workspace.rs b/lib/src/workspace.rs index dbcd359c60..cb0a2843f6 100644 --- a/lib/src/workspace.rs +++ b/lib/src/workspace.rs @@ -461,7 +461,7 @@ pub struct LockedWorkspace<'a> { locked_wc: Box, } -impl<'a> LockedWorkspace<'a> { +impl LockedWorkspace<'_> { pub fn locked_wc(&mut self) -> &mut dyn LockedWorkingCopy { self.locked_wc.as_mut() }