Add Cursor::seek_end and audit the codebase to use seek_start more
This commit is contained in:
+4
-4
@@ -1290,8 +1290,8 @@ impl WorktreeHandle for ModelHandle<Worktree> {
|
||||
}
|
||||
|
||||
pub enum FileIter<'a> {
|
||||
All(Cursor<'a, Entry, FileCount, FileCount>),
|
||||
Visible(Cursor<'a, Entry, VisibleFileCount, VisibleFileCount>),
|
||||
All(Cursor<'a, Entry, FileCount, ()>),
|
||||
Visible(Cursor<'a, Entry, VisibleFileCount, ()>),
|
||||
}
|
||||
|
||||
impl<'a> FileIter<'a> {
|
||||
@@ -1310,11 +1310,11 @@ impl<'a> FileIter<'a> {
|
||||
fn next_internal(&mut self) {
|
||||
match self {
|
||||
Self::All(cursor) => {
|
||||
let ix = *cursor.start();
|
||||
let ix = *cursor.seek_start();
|
||||
cursor.seek_forward(&FileCount(ix.0 + 1), Bias::Right, &());
|
||||
}
|
||||
Self::Visible(cursor) => {
|
||||
let ix = *cursor.start();
|
||||
let ix = *cursor.seek_start();
|
||||
cursor.seek_forward(&VisibleFileCount(ix.0 + 1), Bias::Right, &());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user