Add Cursor::seek_end and audit the codebase to use seek_start more
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user