Refactored apart the forward and the backwards iterator for diff hunks

This commit is contained in:
Mikayla Maki 2023-05-19 18:09:47 -07:00
parent 43e301eeef
commit bbb68c523c
No known key found for this signature in database
9 changed files with 213 additions and 101 deletions

View file

@ -1785,10 +1785,14 @@ impl BufferSnapshot {
A: 'a + IntoIterator<Item = &'a Anchor>,
{
let anchors = anchors.into_iter();
self.summaries_for_anchors_with_payload::<D, _, ()>(anchors.map(|a| (a, ()))).map(|d| d.0)
self.summaries_for_anchors_with_payload::<D, _, ()>(anchors.map(|a| (a, ())))
.map(|d| d.0)
}
pub fn summaries_for_anchors_with_payload<'a, D, A, T>(&'a self, anchors: A) -> impl 'a + Iterator<Item = (D, T)>
pub fn summaries_for_anchors_with_payload<'a, D, A, T>(
&'a self,
anchors: A,
) -> impl 'a + Iterator<Item = (D, T)>
where
D: 'a + TextDimension,
A: 'a + IntoIterator<Item = (&'a Anchor, T)>,