Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Piotr Osiewicz 2025-02-28 18:33:35 +01:00 committed by GitHub
parent fc52b43159
commit e4e758db3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 180 additions and 190 deletions

View file

@ -1498,9 +1498,7 @@ impl LocalWorktree {
};
scanner
.run(Box::pin(
events.map(|events| events.into_iter().map(Into::into).collect()),
))
.run(Box::pin(events.map(|events| events.into_iter().collect())))
.await;
}
});
@ -3630,7 +3628,7 @@ impl fmt::Debug for Snapshot {
struct EntriesById<'a>(&'a SumTree<PathEntry>);
struct EntriesByPath<'a>(&'a SumTree<Entry>);
impl<'a> fmt::Debug for EntriesByPath<'a> {
impl fmt::Debug for EntriesByPath<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_map()
.entries(self.0.iter().map(|entry| (&entry.path, entry.id)))
@ -3638,7 +3636,7 @@ impl fmt::Debug for Snapshot {
}
}
impl<'a> fmt::Debug for EntriesById<'a> {
impl fmt::Debug for EntriesById<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_list().entries(self.0.iter()).finish()
}
@ -5922,7 +5920,7 @@ struct TraversalProgress<'a> {
non_ignored_file_count: usize,
}
impl<'a> TraversalProgress<'a> {
impl TraversalProgress<'_> {
fn count(&self, include_files: bool, include_dirs: bool, include_ignored: bool) -> usize {
match (include_files, include_dirs, include_ignored) {
(true, true, true) => self.count,
@ -5950,7 +5948,7 @@ impl<'a> sum_tree::Dimension<'a, EntrySummary> for TraversalProgress<'a> {
}
}
impl<'a> Default for TraversalProgress<'a> {
impl Default for TraversalProgress<'_> {
fn default() -> Self {
Self {
max_path: Path::new(""),
@ -5968,7 +5966,7 @@ pub struct GitEntryRef<'a> {
pub git_summary: GitSummary,
}
impl<'a> GitEntryRef<'a> {
impl GitEntryRef<'_> {
pub fn to_owned(&self) -> GitEntry {
GitEntry {
entry: self.entry.clone(),
@ -5977,7 +5975,7 @@ impl<'a> GitEntryRef<'a> {
}
}
impl<'a> Deref for GitEntryRef<'a> {
impl Deref for GitEntryRef<'_> {
type Target = Entry;
fn deref(&self) -> &Self::Target {
@ -5985,7 +5983,7 @@ impl<'a> Deref for GitEntryRef<'a> {
}
}
impl<'a> AsRef<Entry> for GitEntryRef<'a> {
impl AsRef<Entry> for GitEntryRef<'_> {
fn as_ref(&self) -> &Entry {
self.entry
}
@ -6246,7 +6244,7 @@ enum PathTarget<'a> {
Successor(&'a Path),
}
impl<'a> PathTarget<'a> {
impl PathTarget<'_> {
fn cmp_path(&self, other: &Path) -> Ordering {
match self {
PathTarget::Path(path) => path.cmp(&other),
@ -6261,20 +6259,20 @@ impl<'a> PathTarget<'a> {
}
}
impl<'a, 'b, S: Summary> SeekTarget<'a, PathSummary<S>, PathProgress<'a>> for PathTarget<'b> {
impl<'a, S: Summary> SeekTarget<'a, PathSummary<S>, PathProgress<'a>> for PathTarget<'_> {
fn cmp(&self, cursor_location: &PathProgress<'a>, _: &S::Context) -> Ordering {
self.cmp_path(&cursor_location.max_path)
}
}
impl<'a, 'b, S: Summary> SeekTarget<'a, PathSummary<S>, TraversalProgress<'a>> for PathTarget<'b> {
impl<'a, S: Summary> SeekTarget<'a, PathSummary<S>, TraversalProgress<'a>> for PathTarget<'_> {
fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &S::Context) -> Ordering {
self.cmp_path(&cursor_location.max_path)
}
}
impl<'a, 'b> SeekTarget<'a, PathSummary<GitSummary>, (TraversalProgress<'a>, GitSummary)>
for PathTarget<'b>
impl<'a> SeekTarget<'a, PathSummary<GitSummary>, (TraversalProgress<'a>, GitSummary)>
for PathTarget<'_>
{
fn cmp(&self, cursor_location: &(TraversalProgress<'a>, GitSummary), _: &()) -> Ordering {
self.cmp_path(&cursor_location.0.max_path)
@ -6317,13 +6315,13 @@ impl<'a> TraversalTarget<'a> {
}
}
impl<'a, 'b> SeekTarget<'a, EntrySummary, TraversalProgress<'a>> for TraversalTarget<'b> {
impl<'a> SeekTarget<'a, EntrySummary, TraversalProgress<'a>> for TraversalTarget<'_> {
fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {
self.cmp_progress(cursor_location)
}
}
impl<'a, 'b> SeekTarget<'a, PathSummary<Unit>, TraversalProgress<'a>> for TraversalTarget<'b> {
impl<'a> SeekTarget<'a, PathSummary<Unit>, TraversalProgress<'a>> for TraversalTarget<'_> {
fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {
self.cmp_progress(cursor_location)
}