Add a layer of indirection between excerpt ids and locators

This commit is contained in:
Max Brunsfeld 2022-11-23 16:13:10 -08:00
parent 0b0fe91545
commit f71145bb32
8 changed files with 297 additions and 166 deletions

View file

@ -1770,9 +1770,9 @@ impl BufferSnapshot {
fn fragment_id_for_anchor(&self, anchor: &Anchor) -> &Locator {
if *anchor == Anchor::MIN {
&locator::MIN
Locator::min_ref()
} else if *anchor == Anchor::MAX {
&locator::MAX
Locator::max_ref()
} else {
let anchor_key = InsertionFragmentKey {
timestamp: anchor.timestamp,