Give more specific names to all snapshot and text iterator types
This commit is contained in:
parent
ad33111a22
commit
fa379885f1
13 changed files with 229 additions and 207 deletions
|
@ -1,6 +1,6 @@
|
|||
use sum_tree::Bias;
|
||||
|
||||
use crate::{rope::TextDimension, Snapshot};
|
||||
use crate::{rope::TextDimension, BufferSnapshot};
|
||||
|
||||
use super::{AnchorRangeMap, Buffer, Point, ToOffset, ToPoint};
|
||||
use std::{cmp::Ordering, ops::Range, sync::Arc};
|
||||
|
@ -105,7 +105,7 @@ impl SelectionSet {
|
|||
|
||||
pub fn selections<'a, D>(
|
||||
&'a self,
|
||||
content: &'a Snapshot,
|
||||
content: &'a BufferSnapshot,
|
||||
) -> impl 'a + Iterator<Item = Selection<D>>
|
||||
where
|
||||
D: 'a + TextDimension<'a>,
|
||||
|
@ -124,7 +124,7 @@ impl SelectionSet {
|
|||
pub fn intersecting_selections<'a, D, I>(
|
||||
&'a self,
|
||||
range: Range<(I, Bias)>,
|
||||
content: &'a Snapshot,
|
||||
content: &'a BufferSnapshot,
|
||||
) -> impl 'a + Iterator<Item = Selection<D>>
|
||||
where
|
||||
D: 'a + TextDimension<'a>,
|
||||
|
@ -141,7 +141,7 @@ impl SelectionSet {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn oldest_selection<'a, D>(&'a self, content: &'a Snapshot) -> Option<Selection<D>>
|
||||
pub fn oldest_selection<'a, D>(&'a self, content: &'a BufferSnapshot) -> Option<Selection<D>>
|
||||
where
|
||||
D: 'a + TextDimension<'a>,
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ impl SelectionSet {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn newest_selection<'a, D>(&'a self, content: &'a Snapshot) -> Option<Selection<D>>
|
||||
pub fn newest_selection<'a, D>(&'a self, content: &'a BufferSnapshot) -> Option<Selection<D>>
|
||||
where
|
||||
D: 'a + TextDimension<'a>,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue