Add Cursor::seek_end
and audit the codebase to use seek_start
more
This commit is contained in:
parent
f294bfdbd9
commit
dc2805bb14
4 changed files with 82 additions and 76 deletions
|
@ -49,6 +49,16 @@ where
|
|||
&self.seek_dimension
|
||||
}
|
||||
|
||||
pub fn seek_end(&self, cx: &<T::Summary as Summary>::Context) -> S {
|
||||
if let Some(item_summary) = self.item_summary() {
|
||||
let mut end = self.seek_start().clone();
|
||||
end.add_summary(item_summary, cx);
|
||||
end
|
||||
} else {
|
||||
self.seek_start().clone()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start(&self) -> &U {
|
||||
&self.sum_dimension
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue